AnsweredAssumed Answered

Using a Variable in Fieldname Query

Question asked by marty72 on Apr 12, 2016
Latest reply on Apr 12, 2016 by erolst

I have an iPad solution for data collection (including tree species and heights). At the beginning of a project you set a minimum height for each tree species that may be assessed. This occurs in a simple table (MAIN_REGEN_HT) that contains a field for each species where you enter the minimum height for the tree species.

Later in the solution in a related child table people are collecting information about tree species and collecting actual heights for these trees.In the Layout for this child table (REGEN) I have a button with a script that is to be clicked when the actual height for a tree is over the minimum height for the tree species (the Tree is considered Free to Grow when it is above a certain minimum height). In this script I want to check that the actual height is greater than the minimum height that was specified in the related table at the beginning of the project. [This check is important in case the data collector forgets the minimum height for the species].


I tried using a variable to replace the tree species (PW) in this query but obviously FM doesn't like variables in field names:


e.g. REGEN::HT > MAIN_REGEN_HT::$$ht_pw_HT

I also tried Get (ScriptParameter) which is set when the tree species is selected before they would press the button with this script:


e.g. REGEN::HT > MAIN_REGEN_HT::(Get (ScriptParameter))_HT

It didn't like this either.

I am obviously headed down the wrong road so any advice would be most welcome.