Forum Discussion
Reverse Relationship setup
The way to do this is with as many "reverse relationships" as you guess will be enough to cover off 99% if the situation.
One Record Job has many CR Assignments. Make a summary field on that relationship of the Minimum of the Record ID# of CR Assignments. Call it [Record ID# of CR Assignments 1].
Then do a lookup of that down to the child CR Assignments table as we will need it later.
Then do a new Relationship where one CR Assignments has many Records. (yes that sounds backwards, hence its called a Reverse Relationship)
For the reference field (the field on the right side), use that new Summary field called [Record ID of CR Assignments 1]. Get rid of the extra fields that get created on the left side of the relationship (Add Record and that report link field). Do a lookup from the CR Assignments down to Records and bring in the Country Name and call it Country 1.
Wonderful, the Record now knows the first CR Assignment.
Now, make a duplicate of that summary field, but in the duplicate add the extra condition that the [record ID#] is greater than the [Record ID# of CR Assignments 1]. Call it [Record ID# of Operator 2]. Do a lookup of that field back down to the Child Operator table as we will need it later.
Now, in making that duplicate, conveniently, you will find that it duplicated the reverse relationship so now do a lookup in that relationship of the Country Name and call it [Country 2]. Wonderful again, we now have Country #2's name on the Record.
Then make another duplicate of that summary field and just keep going, each time changing the filter so that the record ID# is greater than the previously highest record ID of Operator.
In the end say you collect the names of the first 4 Countries on a Record, so then just string them together in a formula like
List ("\n",
[Country 1],
[Country 2],
[Country 3],
[Country 4])
and put that concatenated field list on your report.
If you stop at say 8 countries and want to allow for the possibility of more, then you would need to create a formula field to detect that the # of CA Assignments was more than 8 (ie a summary count was > 8, and then include some text on the result text string to say
& IF(# CA Assignments] >8 . �.. and more....�
- ShashiKara8 years agoQrew TraineeI have up to 192 countries that could be assigned to the case. So in addition to the reverse relationship, I need to setup 193 fields? 192 for each country and 1 for the formula/summary field? There's no other way to do this?
- QuickBaseCoachD8 years agoQrew CaptainSorry, I should have asked what the typical maximum # of countries could be for a single Record. Are you saying that a single record could have as many as 193 Country Assignments in practice?
- ShashiKara8 years agoQrew TraineeYes, a single record could have up to 192 country assignments.
- QuickBaseCoachD8 years agoQrew CaptainAh, sorry, then I have no native solution to offer. This will need to be done by script.