Populate Attribute Table Based on Select_one Response

229
2
02-15-2020 11:35 AM
SageTezak
New Contributor

I would like certain fields in the attribute table to populate based on a select_one response. For example, the user must chose Mooring, Vessel, Mooring & Vessel or Non-TBMP. Based on this answer, certain fields will show up on the form. For example, if the user chooses Vessel, the next set of questions relate to the vessel; however, if the user chooses Mooring, the next set of questions will relate to the mooring. This all works great on the form!

However, I'm stuck on populating the output table. I would like the fields in the attribute table to be populated with "Not Applicable" when Vessel is chosen and the fields are related to Buoy/Lease Visibility. I would like the same to happen when Mooring is chosen and the fields are related to the vessel. See image below. Is it possible to automatically populate fields with NA?

0 Kudos
2 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Sage,

It is possible to construct this, to it makes the form a little more complicated.  You would do this by slightly separating the question the user sees from the answer supplied.  Create a calculate question to submit the value to the database and have it use the coalesce function to provide the NA default value if the question:
coalesce(${q}, 'NA').  Take a look at the sample attached.

0 Kudos
SageTezak
New Contributor

Great! Thank you, kindly.

0 Kudos