Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
See the attached application. What I want to do is using the button (DB) to switch names and values for These variables
from their names in the database to plain text.
Eg
I have a variable for gender. It's called "SexCode" in the database but only "Sex" in the plain text. Values for the units "1"
and "2" in the database, but "Male" and "Female" in the plain text.
When I click the button DB then I want to show "Sex" instead of "SexCode"and "Male" instead of "1".
I have a table (Variables) for what these variables named in the database and in plain text.
I have over 100 of variables in 15 tables. The above is just an example.
Thanks in advance for the help.
Stravan
Hi Khabat,
see attached. It's a mix of FieldValue() for labels and if() for the fields. But for dynamic fields you will need to use a straight table chart instead of table object.
- Ralf
Hi Ralf, Thanks for your response. Do you know if you can do it in any other way using something else instead of FieldValue ()?
FieldValue () needs elem_no and this can be difficult to keep track of if you have more than 100 variables.
This would be perfect if you had a function like lookup () with the help of FieldName to retrieve FieldNameDB and FieldNamePlainText (ie switching between FieldNameDB and FieldNamePlainText as the field names in the tables using the button), see the new table (Variables2) as are in the script.
Thanks so much.
Khabat
Hi Khabat,
LookUp() works in script only but you can use a combination like this:
=FieldValue('$(vDisplayLabel)',FieldIndex('FieldName','acc_nr'))
- Ralf