Select to view content in your preferred language

pass name and the label from select-one pull table

857
5
08-22-2022 11:47 AM
AndrewPriest
Emerging Contributor

hi, I'm guessing this is an easy one, but it's got me stumped. I'm pulling a .CSV for a select_one question. it's passing the name fine, but I also want to pass the label value to the point feature class. would the jr:choice-name formula pass both? or is there a way to set up some sort of table join? thanks

Tags (1)
0 Kudos
5 Replies
ZacharySutherby
Esri Regular Contributor

Hello @AndrewPriest

The jr:choice-name() function is the way to extract the choice label from the selected choice. You could store the label in a separate hidden question (field in the feature service), or concatenate the choice name from the select_one question and the choice label using the jr:choice-name() function in a separate question (field) to store both in the same location. 

Thank you,
Zach
0 Kudos
LaurenceTait
Frequent Contributor

What do you mean when you say that you are pulling a .CSV for a select_one question? Do you mean that you are using the select_one_external function? Or that you are setting the default for the select_one question using a a pulldata function? Or that you are using the answer from the select_one in a pulldata calculation in another field?  Or something else?

0 Kudos
AndrewPriest
Emerging Contributor

hello. the question type is:

select_one_from_file MySpreadsheet.csv

the .csv is in the media folder

the calculation is:

pulldata('MySpreadsheet','name','label', ${Field})

thanks for the reply! any insight on how I can calculate the Label in a new field would be greatly appreciated

 

0 Kudos
LaurenceTait
Frequent Contributor

OK, I think see what you're doing.

There's two ways of calculating the label in a new field. You can either pull the label from the csv or use jr:choice-name to calculate it from the selected answer.

LaurenceTait_1-1661299792498.png

Example attached below

0 Kudos
AndrewPriest
Emerging Contributor

Thanks! I'll give it try

0 Kudos