Skip to main content
Question

Create new attribute using parameter name

  • November 11, 2024
  • 2 replies
  • 37 views

katt
Supporter
Forum|alt.badge.img+12
  • Supporter

Good day,

I have the following parameters in my script:

AVE_AVENUE
BLVD_BOULEVARD
CTR_CENTRE
PL_PLACE
RD_ROAD

Each parameter is set up as a choice, when running the script you have the option to chose YES or NO for each parameter.

Later in the script I want to retrieve the parameters for which YES has been chosen. I want to create a new attribute whose value is a list of the parameter names (keep only the letters before the underscore). Let’s say AVE_AVENUE, BLVD_BOULEVARD and CTR_CENTRE are set to YES ; PL_PLACE and RD_ROAD are set to NO. A new attribute called “address” is created and its value should be: ‘AVE’, ‘BLVD’, ‘CTR’. How can I do so ? Thanks for your help.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • November 11, 2024

I’d look at using a single choice parameter with a tick box

So set up like this

This is then presented as tick boxes for yes and no

Then using a parameter fetcher to create an attribute called address you get

‘AVE’ ‘BLVD’ ‘CTR’ and it’s then straightforward to swap the spaces for commas if that’s what you need


katt
Supporter
Forum|alt.badge.img+12
  • Author
  • Supporter
  • November 11, 2024

Hi @ebygomm Thank you ! It’s working fine. One last question that popped up: I have a featurewriter and I want to give the dataset the same name as the display value (and not the value itself) of another parameter for which I used a choice configuration as well. How can I do it ?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings