Home » RADICORE development » Transaction Patterns » PopUp - Link1 table
Re: PopUp - Link1 table [message #7414 is a reply to message #7413] |
Sun, 15 March 2020 12:51 |
AJM
Messages: 2371 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
It looks like you have two tables called TEAM and TEAM_MEMBER which are in a one-to-many relationship with TEAM as the 'one' and TEAM_MEMBER as the 'many'. Your POPUP1 screen should therefore refer to TEAM on its own while the POPUP2 should refer to TEAM as the 'outer' entity and TEAM_MEMBER as the 'inner'.
You do not say which pattern you are using to call the POPUP2 screen. It cannot be an ADD4 as it does not have a visible screen.
FAQ79 states that you would normally call a POPUP2 screen by passing in $where the identity of a single row in the 'outer' entity, in which case it will display that selected row in the outer zone and populate the inner zone will all associated rows from the inner entity. However, if the $where string is empty you will need code in the _cm_initialise() of the inner entity to pause the execution of the POPUP2 screen and call a POPUP1 screen in order to prove a non-empty value for the $where string.
You say that your first problem is that in the _cm_initialise() method of the TEAM table you have to clear the contents of the $where string so that it will retrieve all possible entries. The value which appears in the $where string for a popup form is set in the _cm_popupCall() method which calls that popup, so if you want an empty $where string then you must set $where to NULL (or an empty string) in that _cm_popupCall() method. It is only when you call a POPUP2 screen that the $where string may point to a row on the 'outer' entity. If a non-blank value is supplied the POPUP2 form will perform a lookup on the 'outer' entity using this value then populate the 'inner' with rows which belong to that 'outer' row. If the $where string you pass to a POPUP2 form is empty then it will fail unless you follow FAQ79.
You say that you cannot change $settings['select_one'] = true for the POPUP1 form when activated from the _cm_initialise() method in the TEAM_MEMBER table, but this is not correct. If you look at the arguments for the scriptNext() function (see https://www.tonymarston.net/php-mysql/functions-and-variable s.html#func.scriptnext) you will see that the 4th argument is an array of task details. You can provide this argument with a value such as $array['settings'] = 'select_one=TRUE' in order to provide the desired effect. If you want multiple settings you must separate them with an '&' such as as in 'select_one=TRUE&choose_single_row=TRUE'
When you say that the 'Choose Null' button is not displayed in the POPUP2 form this is because $settings['select_one'] has been set to true for that popup.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|
PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Mon, 23 May 2016 05:59
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Wed, 25 May 2016 04:39
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Wed, 25 May 2016 07:28
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Wed, 25 May 2016 10:12
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Thu, 26 May 2016 14:48
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Fri, 27 May 2016 05:41
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Sat, 28 May 2016 05:09
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Wed, 01 June 2016 05:18
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Sun, 15 March 2020 12:51
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Mon, 16 March 2020 13:02
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Wed, 18 March 2020 06:28
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Thu, 19 March 2020 05:23
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Sat, 21 March 2020 07:52
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Sun, 22 March 2020 05:19
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Mon, 23 March 2020 06:47
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
|
|
|
Re: PopUp - Link1 table
By: AJM on Sat, 15 August 2020 04:38
|
Goto Forum:
Current Time: Thu Nov 28 12:28:13 EST 2024
Total time taken to generate the page: 0.01489 seconds
|