Hi, so I have two repeating groups: Active Calls which is a repeating group of calls - one of their fields is units; and Active Units. I would like to display the index of the active call the active unit is on in their repeating group, how could I do this?
Using states. Can we get a screenshot or an editor link so I can hone my answer? How are you deciding which is the active call and which is the active unit?
If it’s that simple, and you have them in a state or as a data source for an element outside the RG’s already, you can just put conditionals on an element in your RG (borders, a color, etc…) and say if “Active call” is current cell’s “Call” then - style it the way you want. In the picture below Group A is outside the RG and I can access it’s data source and make sure it’s the same as current cell’s.
I’ll detail the data types a bit more:
- Call with fields
- Active - yes/no
- Units - List of Units
- Details
- Unit
- User
- Active - yes/no
I have 2 repeating groups:
- Active Calls - All Calls that are active with details about said call
- Active Units - All units that are active
I want to show, in the active units rg the index of the active call they are on.
For example: There is only one active call A with Unit A, there are active units A,B,C. Unit A has a 1 next to their name because they are in active call A which has the index 1.
How could I actually do this? I have the logic down but I don’t know how to display the index of the results of a search
I see. With that data architecture, you can’t because there’s nothing linking the unit itself back to the call they’re on.
The easiest way I could think of is this:
You can add a “Current call” field on the unit (Type call), and an CallID field on the call. When a unit gets added to a call, change their call number. You can then access it within the RG like I did here.
I know it’s not the leanest, but it will work. Hope it helps.
thanks for the help. I’ve ended up changing what I want to do but this would have worked if I had decided to do what I wanted originally.
This topic was automatically closed after 70 days. New replies are no longer allowed.