This topic is locked

result lookup wizard

7/5/2011 4:21:55 PM
PHPRunner General questions
R
rocknroll_france author

Hum... Sorry, but I posted on very first time on ASP forum, with one another post (I'll open it in this section too in few minutes)
Hi,

In my edit page, I transformed a text filed in lookup with:
Table name: MyTableName

Link field : Id

Display field: Name
I try different solutions, but when updating, I have always the Display field registered in DB.

I want display the Name, but register the Id...
Is it possible with Lookup field ? Or must I make a dropdown? And, if yes, I think there is some adaptation (name of the field...etc...)

Thanks for reply

C
cgphp 7/6/2011

PHPrunner saves the Link field of the Lookup wizard not the Display field.

R
rocknroll_france author 7/7/2011

Hi Christian,
Hum.... sorry, I thought that it should be (as any dropdown in PHP programming) but:
My lookup options:

Table: tb_mdp

Link field: id

Display field: club

Order by: Club

where : "tb_mdp.adher11 = 'O'"
Dropdown: Multiligne 1 row

This dropdown DOESNOT depend of one another and non dependent dropdown.

This is just a "normal" dropdown !
Précision : It's on the EDIT form

The saved value IS the CLUB, not the ID...

C
cgphp 7/7/2011

It's hard to say what's happening if I don't see your app.

R
rocknroll_france author 7/7/2011

For testing , I made a new project with only 1 table
Table1

id

Name

date

Id_2

Id_3
Id_2 is generally = to Id (but can be different, so enter manually)

Id_3 (the concerned field !!) must be fill with an Id of one another table (called here Table2)
In the edit form from the Table1, I change the TEXT field Id_3 in "Lookup wizard" with parameters of Table2 as follow:
Table: Table2

Link field: id

Display field: club
(I also make a where condition and an Order by)
When I click on the "Lookup wizard test", the return value is OK (if I choose a club, the test return a correct number = Table2.id)
If i test this dropdown in the edit form, the dropdown update the record perfectly, but with the club (display field), not with the id (link field)
Precision: there is no join between the 2 tables on the "tables" or "query" pages in PHPR !
I'm become completly crazy with that <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=59302&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />