This topic is locked
[SOLVED]

 Question on how to pass List value to Add page

2/24/2014 5:51:17 AM
PHPRunner General questions
A
Anapolis author

[size="2"]I have a form used in an office that uses a Suggest Search Ajax window in the top field as a Client account number is typed in. As the office User starts typing in numbers the choices narrow down until they select the account number they want to use.
Then the Client name, Address, City, Zip code are filled into readonly fields before the rest of the form is filled out by the user of the form.
When the Client Account number is not known the Master Client Account information table must be searched by city, zip, phone, name, etc.
In the Client accounts List page I want the "Client Account number" for all records to be a hyperlink that when selected jumps to the Add Client form page while passing along just the Client Account number.[/b]
If the office user finds one master client record that matches their search results then I want them to simply click the highlighted Client Account number in that list view and when the Add Form shows up the Account number is filled out and the Ajax autofill is still working to fill in the Client name, address, city, zip.
What is different about this from the Master table - Detail table links that PHPRunner does is that there is NO MASTERKEY reference because the Add Form Record has not been created yet.
I think I am looking to use the Client Master table Edit page in Runner to WRAP the Client number field with a link, such as "http://webname.com/phprunnerproject/clientreport_Add.php&clientnumber=".{$clientaccount_value}.""; I know the syntax is wrong because in my tests it does not open the Clientreport_Add.php.
But it illustrates the principle.
The examples I have looked at always seem to be using a MASTERKEY value which cannot work in this case when the record itself does not have a Masterkey to refer to.
Thank you for cluing me in![/size]

A
Anapolis author 2/24/2014

I have asked the Question below because the Lookup Wizard setting if set for "List Page with Search" never allows for a complete field search of the Master Client table.
"List page search" creates a Lookup link next to the Account Field on my Add page for my Report form that says "Select".
What I get is a popup with the Master Client table and the only Search function offered is an "All Fields Search".
What I must have is specific fields search windows so as to focus on Name or City or Zip code.
No amount of settings and resettings of Search and Filter Settings gives me a more sophisticated lookup by specific fields the way my search settings are set when I am actually on this Master Client table page.
The Lookup wizard template seems to provide only one Lookup... the "All Fields Search". This is insufficient. I can't be searching for a zip code while having similar account number strings also being mixed in to the Search results. I need fine tuning right away.
I do not see a way to edit this so that I can configure more options when the Lookup Wizard popup Search is in play.



[size="2"]I have a form used in an office that uses a Suggest Search Ajax window in the top field as a Client account number is typed in. As the office User starts typing in numbers the choices narrow down until they select the account number they want to use.
Then the Client name, Address, City, Zip code are filled into readonly fields before the rest of the form is filled out by the user of the form.
When the Client Account number is not known the Master Client Account information table must be searched by city, zip, phone, name, etc.
In the Client accounts List page I want the "Client Account number" for all records to be a hyperlink that when selected jumps to the Add Client form page while passing along just the Client Account number.[/b]
If the office user finds one master client record that matches their search results then I want them to simply click the highlighted Client Account number in that list view and when the Add Form shows up the Account number is filled out and the Ajax autofill is still working to fill in the Client name, address, city, zip.
What is different about this from the Master table - Detail table links that PHPRunner does is that there is NO MASTERKEY reference because the Add Form Record has not been created yet.
I think I am looking to use the Client Master table Edit page in Runner to WRAP the Client number field with a link, such as "http://webname.com/phprunnerproject/clientreport_Add.php&clientnumber=".{$clientaccount_value}.""; I know the syntax is wrong because in my tests it does not open the Clientreport_Add.php.
But it illustrates the principle.
The examples I have looked at always seem to be using a MASTERKEY value which cannot work in this case when the record itself does not have a Masterkey to refer to.
Thank you for cluing me in![/size]

Sergey Kornilov admin 2/24/2014

I've read it twice but just cannot grasp it. Could you rephrase your question or narrow it down somehow?
Some screenshots or links to live application can help as well.

A
Anapolis author 2/24/2014



I've read it twice but just cannot grasp it. Could you rephrase your question or narrow it down somehow?
Some screenshots or links to live application can help as well.


Here is what the Lookup Wizard offers with the Form the User is to fill out. The "SAP" is the Account number of the Client pharmacy. The SELECT link will produce a POPUP SEARCH Window which I will show below.


This is what I GET when I use the popup Search window offered with the Lookup Wizard. This cannot be changed from a Simple search to the more focused "per field" search that List pages normally can have.


And this image below is what I want to give the user, if I could. The ability to keep the User on the Form ADD page while using a Popup window that can give more accurate Search options of the Master table.
the same Complex Search Options of the Master Table list pagerecord of thousands of Pharmacies.


The form they are filling out needs values from the Master Table before it can be completed and submitted.
If the user does not know the Account number directly enough for a reliable Simple Search then they need to pull up the correct Master table record in the Master Table list page.
In the case information is incomplete they will need to Search the Zip Code or the City or the Address or even fax number to NARROW the search down to the best matching record.
One way or the other I want them to have a simple way to Select the Correct record that then autofills, so to speak, the separate Form fields. The form is NOT written to the Master Table.
So that THIS HAPPENS NEXT


If no more complex Search Option is available to pull up the correct record in the Master Pharmacy Table then I would like to make the Account Number in the Master Pharmacy table LIST page a clickable Link that would send the User back to the Form with the SAP and name, address, city and zip code filled out with those values from the selected Master Table record.

Sergey Kornilov admin 2/25/2014

Thanks, it makes sense. Additional search options are not currently available in 'List page with search' mode. We'll consider adding it.
Passing data to the Add page from List page is possible though. Your best bet is yo use 'View as' Custom for one of fields in order to build a hyperlink with parameter in it.
Example:

$value = "<a href='somepage_add.php?someparam='".$data["somefield"].">Add item</a>";


Just replace somepage, someparam and somefield with something meaningful.

A
Anapolis author 2/26/2014



Thanks, it makes sense. Additional search options are not currently available in 'List page with search' mode. We'll consider adding it.
Passing data to the Add page from List page is possible though. Your best bet is yo use 'View as' Custom for one of fields in order to build a hyperlink with parameter in it.
Example:

$value = "<a href='somepage_add.php?someparam='".$data["somefield"].">Add item</a>";


Just replace somepage, someparam and somefield with something meaningful.


Thank you very, VERY much, Sergey!
Your solution is what I originally posted for.
To have the Account number of each Master Table already a Hotlink that when clicked would post the Account value in the Form Add page field.
I had to change the " ' quotes and single quote marks of the custom expression a bit to finally get it to work out.
What finally worked:
The following line was written into the Custom Expression window for the List page of the Master Pharmacy Table to wrap the account number ("kundennummer" in German) for each pharmacy in a link pointing to the Feedback Add page of the form.
$value="<a href='vividrin_feedback_add.php?sap=".$data["kundennummer"]." '>".$data["kundennummer"]."</a>";
This then created an individual link value such as:
http://localhost:8085/vividrin_feedback_add.php?sap=22009056
shown in this Image --


On the feedback form Add page in the Editor I specified that the Default value was the following:
$_REQUEST["sap"] default value in Add page field
This was in the same settings view that already had a lookup wizard applied to autofill other field values if the SAP field was filled in.
And clicking one of those Account numbers instantly opens the Feedback Form and shows that all these fields are already filled out.
like this:


THANK YOU again, Sergey!