This topic is locked

using lookup for default values on Add Record

10/10/2008 1:35:22 AM
PHPRunner General questions
C
comlan author

Using PHPRunner 5.0 Build 435.
I am not able to get the lookup feature on an add to work properly. It worked for me in 4.2.
When I hit the "test it" button it shows the value from the lookup table and field, however, after building and uploading, the field is blank on an add instead

of putting in the default value. Drop down works fine, but then I cannot edit the value to anything other than the default.
Any ideas?
I am also seeing very, very slow FTP Uploads, even when it is going to a server on the local network.
Thanks

J
Jane 10/10/2008

Hi,
It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.
Regarding FTP problem.

We're working on it now.

C
comlan author 10/10/2008

Okay, Here is more info on my question.
This does not seem to be working the same way it did with V4.2
On the "Add" page, I go to "Edit As Settings" and choose "Text". With my 4.2 project I would use this syntax to set the default value from another table record that belongs to this person such as "$_SESSION["maxattempts"]". This worked great. It read the value, set it as the default on the "ADD" page, but still allowed it to be changed. The only way I can get it to read the value now is if I use a drop down, however, then I cannot change it from the default if desired.
Must be a change, or something silly I am overlooking. Or maybe I am doing it wrong and it was just a fluke that it worked before?? Hope that makes sense.
Thanks for your help.

J
Jane 10/13/2008

Hi,
dropdowns and default values work in the same was in the PHPRunner 4.2 and 5.0

I suppose you need to set up this field as readonly on the "Edit as" settings dialog on theVisual Editor tab and use your $_SESSION["maxattempts"] as default value.

C
comlan author 10/13/2008

Thanks for your reply Jane.
When I go back and load and look at my 4.2 project, I am doing things the same way, but not getting the same result.
I am using "Edit as Text Field", plugging this in "$_SESSION["maxattempts"]" in the "Default Value Box".
When I go over and click on the "Lookup Wizard" it has the "Table", "Link Field", and "Display Field" completed with the values I am trying to display. When I hit "Test It" from there, it is reading the proper value from the other table.
If I use the "Drop Down" box from there, it does display the proper default value, but that does me no good, as I need to allow that value to be manually changed upon an "Add" if necessary.
What am I missing here??
Thanks for your help.

J
Jane 10/14/2008

Hi,
I suppose you need to use Add new values on the fly option on the "Edit as" settings dialog on the Visual Editor tab to change value in the dropdown.

C
comlan author 10/14/2008

This requires me to be able to add another value to the "default value" table I am reading from. I don't want to add another value to the table, I just want to read the value, plug it in as the default on the "Add New" screen and then be able to change it to any other value different from the default that was read in from the table and save the record.
As I mentioned, this was working the way for me as described above in V4.2.
Thanks

J
Jane 10/15/2008

Hi,
I see what you're saying.

But there it's impossible in both PHPRunner 4.2 and 5.0.

Could you send link where I can see and troubleshoot this issue to support@xlinesoft.com?

S
Stoneman 11/8/2008

The only time I have seen this happen was when i tried to write a text value to an integer field in the database. The drop down looked good in PHP Runner but was a flat text box on the webpage. Data could be typed in but was not saved when record was updated.
Once I fixed the link problem so that the linked value was the integer field - Everthing worked like it was supposed to.