Suppose I have the following table:
Field1 Field2
#1 A 100
#2 A 200
#3 B 100
#4 B 300
I want to use a drop-down list box with previous values on field2, but only with matching field1 values. So when record #1 is selected (Field1 is A), I want to get 100 and 200, not 300 (Field1 is B).
When I define a lookup-previous values rule for Field2, I always get all values (100,200,300).
Adding a filter to the rule like:
Field1 == var-"curr_field1 (where curr_field1 is set to the value of field1 I want to see)
doesn�t work neither. Because Field2 with value 100 is only indexed once (unique values), I get this value only if curr_field1 is A, not with B.
Is there a way to work around this without the use of a separate table?
Setting a lookup-previous values rules creates an index with unique value of the field. Tried to change this index by hand, but A5 isn�t tricked by this and simply creates a new one.
Wouldn�t it be more flexible to have something like an �Index Lookup� as one of the lookup styles with the same functionality as �Previous values�, but where the index isn�t determined/built by A5 and you have to select one of the existing indexes of the table?
BTW noticed:
When setting a filter for a lookup style, the option to select variables in the Expression Builder isn�t shown, but F6 works.
Field1 Field2
#1 A 100
#2 A 200
#3 B 100
#4 B 300
I want to use a drop-down list box with previous values on field2, but only with matching field1 values. So when record #1 is selected (Field1 is A), I want to get 100 and 200, not 300 (Field1 is B).
When I define a lookup-previous values rule for Field2, I always get all values (100,200,300).
Adding a filter to the rule like:
Field1 == var-"curr_field1 (where curr_field1 is set to the value of field1 I want to see)
doesn�t work neither. Because Field2 with value 100 is only indexed once (unique values), I get this value only if curr_field1 is A, not with B.
Is there a way to work around this without the use of a separate table?
Setting a lookup-previous values rules creates an index with unique value of the field. Tried to change this index by hand, but A5 isn�t tricked by this and simply creates a new one.
Wouldn�t it be more flexible to have something like an �Index Lookup� as one of the lookup styles with the same functionality as �Previous values�, but where the index isn�t determined/built by A5 and you have to select one of the existing indexes of the table?
BTW noticed:
When setting a filter for a lookup style, the option to select variables in the Expression Builder isn�t shown, but F6 works.
Comment