In order to build a very dynamic layout I have the following scenario: Users can select multiple "Resources" from a checkbox set and then the associated text label and icon will appear elsewhere on the layout for each selected resource. Also, each resource has a status associated with it (e.g., new, updated, cancelled); the aforementioned icon for each resource will be determined by that resource's current status.
It works as follows:
1) User selects 0...n "resources" from a checkbox set (i.e., Resource1, Resource2, ...). This is stored in the field "Activity_Resources"
2) Each resource has a field for storing its current status, e.g., ResourceStatus_Resource1, ResourceStatus_Resource2 (note that they are all named with this convention" "ResourceStatus_" & Resource#)
3) A repeating calculated field (which is "recalculate as needed") is defined as: GetValue( Extend(Activity_Resources) ; Get( CalculationRepetitionNumber ) ). This repeating field is called "Activity_Resource Names" and basically is just a handy trick for converting a list of items in to a repeating field.
4) There is a custom function StatusIcon(Status) which returns the correct image file of the icon associated with the given Status.
So far, so good: My repeating field "Activity_Resource Names" dynamically displays the resources when the user selects (or de-selects) from the checkbox.
To display the proper icon, there's a second repeating calculation field (which is "recalculate as needed"):
CurrentStatuses = GetField("ResourceStatus_" & Activity_Resource Names[Get(CalculationRepetitionNumber)])
CurrentStatuses should be a repeating field containing the status for each of the resources. The purpose of this repeating field is merely to use as the parameter for the custom function: StatusIcon(CurrentStatuses[n])
My problem is that the repeating field CurrentStatuses doesn't get calculated properly via the "GetField" function--- only CurrentStatuses works... Any other repeat after the first value is empty.
Any thoughts or comments are appreciated.