External Choice, Domains and Filtering Help

280
0
07-06-2022 01:09 PM
JimW
by
Occasional Contributor II

I have a hosted feature service that can have five component types: asphalt base road (ABR), concrete base road (CBR), sidewalk (SWK), driveway (DWY) and grass (GRS). I have a related child table that stores bid items, quantities and costs.

In my survey, the bid items are selected in a repeat and I currently have the bid items as an external choice. The bid item is selected in a select_one_external and the list is filtered using a choice filter statement based on the selected component type so that only the bid items that apply to the selected component are shown.

When a bid item is selected, the name value is used in a pulldata statement to get the cost of that bid item that is stored in a CSV file and ultimately a total cost for that bid item and component is calculated.

Some bid items apply to multiple components. I currently have a domain in my bid items table that lists all of the bid items that can apply to a given component type.  Below is a simplified example of my external choice sheet which is my domain in my bid item table:

namelabelComponentType
203 Process Trap Rock BaseABR
212 HMA S0.5 L2 <= 300 SY-inchABR
247 Process Trap Rock BaseCBR
256 HMA S0.5 L2 <= 300 SY-inchCBR
276 8 in. Reinforced CBR Installation <= 300 SYCBR
302 HMA S0.375 L2 <= 300 SY-inchSWK
304 5 in. Concrete SidewalkSWK

 

This has been working well for a few years.  However a new contract was recently awarded and some bid items where added and costs changed.  I was going to generate a new list and append it to my bid item domain.  However, I found out that AGO domains don't allow you to have duplicate labels and as a result I cannot make any changes to the domain unless I go through and make each label unique, which may be what I have to do.  

I did look into simplifying things so that my table above becomes this:

namelabelComponentType
203 Process Trap Rock BaseABR, CBR
212 HMA S0.5 L2 <= 300 SY-inchABR, CBR
276 8 in. Reinforced CBR Installation <= 300 SYCBR
302 HMA S0.375 L2 <= 300 SY-inchSWK
304 5 in. Concrete SidewalkSWK

 

But I couldn't figure out how a choice filter statement that would work.  It may be that I have spent too much time looking at this today and am missing something simple. And I still run into the issue with duplicate labels because my existing domain still has the same labels, which need to be maintained, because there is still work being done under the old contract.

I attached my Survey in case that helps make any of this understandable.

If anyone has any suggestions, I would love to hear them!  Thanks.

0 Kudos
0 Replies