1. Home
  2. Administrators
  3. Formulas
  4. JavaScript functions
  5. getField function – Get the value of a field from another category

getField function – Get the value of a field from another category

When performing calculations with fields from related categories, it is not necessary to have those fields defined in the category that needs to use them. For example, in a structure:

Country -> Province -> Population

If in a Population formula we need the value of a field of your Country , it is not necessary to create a related field.

The getField function allows you to access the value of any accessible field in the data structure:



Route : It is a text string between quotation marks that allows the field to be unequivocally located. To do this, we must start from the category in which we find ourselves and search for the destination field using Drop-Down Lists to Another Category. This path can be typed manually or by using the Create button from the Tag Viewer.

For example:

'Data:Province-> Data:Country-> Data:Per capita income'

The arrow operator -> It always outputs a dropdown list that must exist in the category and is used as the data source. Just like creating read-only fields for a category, we can drill down through the names of other Drop-Down Lists until we end up with the target field.

Important : The final destination field must be a field of the destination category, that is, it cannot be a related field.

Updated on 21 de November de 2023
Was this article helpful?

Related Articles