Hello, mates!
I would like to create a rule that will provide choices/options through parameters to be used with the choose() function (https://docs.appian.com/suite/help/25.1/fnc_logical_choose.html)
choose()
However, the choices will not have a default length. I tried using Appian array, but as expected, it didn't work because choose() expects individual parameters, not an array.
I'm working on creating a tab interface component, where the number of tabs isn't fixed, hence the need for dynamic choices.
Does anyone have any hint on this? Thanks.
Discussion posts and replies are publicly visible
Don't use choose() at all now. For anything. We have a!match() now.
does it work with an array of values? I don't think so
It works with anything you want. I'd be happy to help you through a realistic example if you want, but you'll need to provide some sample code / sample data / screenshots / etc, just something more than a vague description.
Thanks, here it goes:
I have a tab interface where an index controls which content should be displayed. The content for each tab is stored in an array, and I need to show the content that matches the current index.
{ a!tagField( labelPosition: "COLLAPSED", tags: { a!tagItem( text: "TAG", backgroundColor: "ACCENT" ) } ), a!tagField( labelPosition: "COLLAPSED", tags: { a!tagItem( text: "TAG 2", backgroundColor: "NEGATIVE" ) } ), a!tagField( labelPosition: "COLLAPSED", tags: { a!tagItem( text: "TAG 3", backgroundColor: "POSITIVE" ) } ), }