This topic is locked
[SOLVED]

 How to update a field based on a selection & values in another table

3/9/2015 1:19:48 PM
PHPRunner General questions
M
mmaner author

I have a lookup field named [condition] using a list of values (OK, BAD, NONE PRESENT) in table1. I need to auto-populate a field named [loss] in table1 based on the [condition] selection and the value associated with that condition in table2.
Here's an example...
table1 [condition]: OK

table2 [loss-ok] = 0

OK has a value assigned, so the [loss] field would show the value of [loss-ok]
table1 [condition]: NEW

table2 [loss-new] = 0

NEW has a value assigned, so the [loss] field would show the value of [loss-new]
table1 [condition]: BAD

table2 [loss-bad] = 10

BAD has a value assigned, so the [loss] field would show the value of [loss-bad]
table1 [condition]: NONE PRESENT

table2 [loss-none] = 100

NONE has a value assigned, so the [loss] field would show the value of [loss-none]
I appreciate your time and help on this, as its been kicking my butt for hours now <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=23025&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />.