This topic is locked
[SOLVED]

 Add Page Lookup Settings override List & View

2/19/2014 3:21:20 PM
PHPRunner General questions
A
Anapolis author

[size="3"]I am using PHPRunner 7.1 and am finding a problem persisting that I cannot easily fix.
I am hoping that I can describe it well enough that someone will recognize it and give me a solution.
In some current projects I have a field, let's say it is called "SAP". This field is an INT(11) to store only a 10 digit number.
In the Lookup Wizard for the ADD page or form I have used a CONCAT(....) to pull up some other text fields so that the SAP can be matched with a Pharmacy Name, Address, City, ZIP code.
The user has a view friendly selection that is not just a list of naked numbers.
When the Form is Saved the only value that is inserted into the SAP field is the associated pharmacy ID number, such as, 12312345234. Just as I intended it to do.
However, in the LIST View the Lookup Wizard Values are being substituted instead of the Number that is actually sitting in its INT field.
This problem has been happening in my projects even when I select "Use different Settings for all pages". And then it behaves nicely in another identical type field or fields in the same List view.
I just want a text view, which is the default in PHPRunner 7.0 and 7.1. I just want the List to pull up the numeric value found in the SAP fields.
But whether I specify this in the EDIT and ADD pages or in the LIST page editing view it does not work when I update and post online.
What I see in list view is the not only the SAP number but the Pharmacy Name, Address, City, and ZIP code in this Numeric Field.
I have tried switching the List and View settings to a Numeric value to match the field type but that still does not work.
The actual database shows just the SAP numbers as I designed.
My WORKAROUND has been to enter a Custom Value into the List and View pages such as $value = $data["sap"]; but it seems that this step should not be necessary if the default operation for Runner was working in every situation.
Is there a MAGIC step that can clear out the Lookup Wizard Add and Edit settings to keep them from being applied to List and View pages?

[/size]

Sergey Kornilov admin 2/19/2014

I guess you have answered your own question.
The default behaviour is to display 'Display field' everywhere. In more than 98% of cases link field is a meaningless ID number that doesn't make sense to show to the end user. In those rare cases when Link field makes sense to be displayed the workaround you suggested is the proper way to handle this situation.
The rule of thumb is that the most common option should be default one.

A
Anapolis author 2/20/2014



I guess you have answered your own question.
The default behaviour is to display 'Display field' everywhere. In more than 98% of cases link field is a meaningless ID number that doesn't make sense to show to the end user. In those rare cases when Link field makes sense to be displayed the workaround you suggested is the proper way to handle this situation.
The rule of thumb is that the most common option should be default one.


Thank you!