ValueListItems() quit returning results
11.0v4 (possibly earlier. hard to tell. this code hasn't been touched in a while)
Operating system version
Mac OS X Snow Leopard and Lion
Description of the issue
I am an intermediately capable FileMaker coder. I have a solution I created for an activity at work which recently broke in a critical part of a reporting process.
Does anyone know if the function ValueListItems() was broken with the 11.0v4 update? It was working fine before that and I cannot think of anything that touched that part of the code.
In places where possible, I prefer making code dynamic, rather than hard-coding items. One case in point is that as part of a report I build, I look at a value list and create temporary counting variables for each item in that value list. It's a bit slower, but the resulting code won't break if a value list is modified. So, borrowing some code from here and other forums, I created the following method for creating the counting variables, which I add to as I loop through records, looking for the occurrence of these items. Make sense? Has worked well over many months of use. Until now.
In the code below, the second Set Var used to create a list of the items in that value list. Now, nothing is returned.
Does anyone know of anything or heard of anything that changed or broke with this function?
Thank you in advance for any help or suggestions.
#Create Vars from Value List "VL_Family_Role"
Set Variable [ $VL1_Name; Value:"VL_Family_Role" ]
Set Variable [ $VL1_Items; Value:ValueListItems(Individuals::gThisVersion;$VL1_Name) ]
Set Variable [ $VL1_Item_Count; Value:ValueCount ( $VL1_Items ) ]
#Loop thru current Value List and create all variables for that list
Set Variable [ $Loop_Count; Value:0 ]
Set Variable [ $Loop_Count; Value:$Loop_Count + 1 ]
Exit Loop If [ $Loop_Count > $VL1_Item_Count ]
Set Variable [ $varName; Value:Filter ( "$" & GetValue( $VL1_Items; $Loop_Count) ; "$AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" ) & "_Count" ]
Set Variable [ $varValue; Value:0 ]
Set Variable [ $whatever; Value:Let ( [ variableName = $varName ; variableValue = $varValue ; formula = "Let ( variableName = variableValue ; \"\" )" ] ; Evaluate ( Substitute ( formula ; [ "variableName" ; variableName ] ; [ "variableValue" ; Quote(variableValue) ] ) //close Substitute ) // close Evaluate ) //close Let ]
If [ $Loop_Count = 1 ]
Set Variable [ $VL1_ListOfVars; Value:$varName ]
Set Variable [ $VL1_ListOfVars; Value:$VL1_ListOfVars & ¶ & $varName ]
Steps to reproduce the problem
Step thru code and watch variables
A list of Value List items loaded into a defined variable
Nothing is returned - the variable is never initialized (which means a null result)
Exact text of any error message(s) that appear