This topic is locked

Tricy Inline Add / Event Processing

5/8/2012 5:18:41 PM
PHPRunner General questions
Z
zephyr325 author

Hello, all. Using PHP Runner 6.0.
I've got a list page (call this for "Table A") that shows three fields, one of which is a person's name field. The problem with names, though, is I need to be able to handle multiple possible names for someone (i.e., Real Name, Nickname, etc.). So I've got a separate table ("Table B") with a master name number, and multiple name possibilities for each name. When I do the list page for "Table A", I've got a "Before Display" function that does a lookup for that master record number in "Table B" and turns that into a name - simple enough for listing purposes.
The question I've got, though, is I'm using this list page to simplify adding records by doing lots of inline adds. I need to setup something that will take the name that is put into the inline add line, do a lookup for the "Table B" key column, and then write that value rather than the name. How do I do this? I'm trying to avoid using the "Add record" page as that would take forever...
Thanks!

Z
zephyr325 author 5/10/2012

Any thoughts here? <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=66053&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
Thanks...

Sergey Kornilov admin 5/10/2012

How's about setting that field as a 'Lookup wizard'?

Z
zephyr325 author 5/10/2012



How's about setting that field as a 'Lookup wizard'?



That's what I'm using to do the initial data entry part - as they type a name, it has to validate from a list of names already in the table. What I'm trying to do is once they've entered that name, and click the green check/add record button, it needs to do a lookup of that name, find that name's master record number, and write that number instead of the name. Make sense?
Thanks...

Sergey Kornilov admin 5/11/2012

I think you can use BeforeAdd event to run a query against your lookup table and substitute textual value with ID if found. Still, Lookup wizard does that automatically for you.