@alienationfreez, maybe you will need to share a dummy questions and choices along with your requirement for the community to understand and help you out.
Here is an example, with 3 options (and remarks). You can test it with the online validator and adapt it to your detailed requirement. translate_CtoE.xlsx (12.6 KB).
It is recommended to always test your form with the online validator, during development and before deployment, please.
Could you explain more your requirement? It seems as you might only be looking for an options to get corresponding country codes for a selection. This could be done differently (e.g. using the code as choice name or adding a look-up column or external file). There is also an international standard for country codes, see UN M49 - Wikipedia.
As I’m not very experienced in this data-management field, it is hard for me to evaluate the different approaches one can adopt to create this dial-/country-code-selector-drop-down.
I did grab a few info and started to build a first version based on what seemed to me being a way to achieve at least something visible. More experienced fellows would probably go different ways.
I came across another issue : the detailed post I started got a few answers but none of them addressing the core question which is what motivates the second and this third thread. At some point of the discussions it also became hard to get focus back on the core question and I saw a new post as the only option to get things moving forward.
I made the following description of the core issue (see screenshot) – trying my best to describe my requirements, which remain those previously mentioned in the previous threads (How to shorten a calculation syntax? / How to shorten the Expression of an Array?) :
@alienationfreez Quick question, do you specifically need to make it a string question? Because you could a select one question, and based on value you could show only one value in the next question, so it would make your life a lot easier than writing the formula
Thanks for your feedback, @osmanburcu !
I presume sticking to the current string-question-approach will capitalize on the info and skills (even if small) I could gather so far on this topic – and even if there probably is other ways and workarounds. I’ll look into the topic you’re suggesting, but this will probably take some more time to chew.