Write: automatic fields filling

Hi there,

I am trying to solve a tricky problem without success.

Created a rather simple template for a technical report.
Much of the cells must be filled “by hand” from the report’s creator, but just one field should be filled by the matching key-value in a list.

I try to explain.
Imagine you have two empty cells in the table of the report and a list (i.e. file) that contains the matching key-value type:

1: Spouse not legally separated
2: Spouse actually separate
3: Natural children recognized
4: Adoptive Children
5: Entrusted children
6: Spouse legally and effectively separate
7: Grandchildren cohabiting
8: Parents cohabiting

I would like to put only the number in the first cell (eg 1 or 4) and have the second cell filled with the matching value picked from the list – file or something else – (eg ‘spouse not legally separated’, or ‘adoptive children’), without having to type directly the value by in hand.

How can I fix?

Thanks in advance

If you don’t need the key number and just want the user to choose from a fixed list, then an Input list field will work.

To insert an Input list field: On the main menu; Insert/Fields/Other/Functions/Input list. Enter your options one by one in the Item box and add them to the list. Click Insert.

When the user clicks on the field, they get a Choose Item dialog where they can make a selection from the list.

Here’s one solution:

Insert > Fields > Other > Variables > Set variable … (variable field “Num”)

Insert > Fields > Other > Functions > Conditional text … (IF Num == 1 THEN “Spouse not legally separated”: IF Num == 2 THEN “Spouse actually separate” : IF Num == 3 THEN "Natural children recognized " …)

View > Field names: ON to see the actual fields