Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
If I have a list of activities in a List box, is it possible to add an expression or definition to group some activities together?
For example my current list box is:
Event - rock climbing
Event - hill climbing
Event - swimming
Training - presentation
Training - one to one
Outcome I want is:
Event
Training
Many thanks.
You can alter the list box to show the results of an expression rather than a field with this:
Then bucket the values with an expression . Lots of possibilities. Here is one with wildcard matching and i threw in an 'other' category if you get unexpected values.
if( wildmatch([FieldName],'Event*'),'Event', if( wildmatch([FieldName],'Training*','Training','Other'))
You can alter the list box to show the results of an expression rather than a field with this:
Then bucket the values with an expression . Lots of possibilities. Here is one with wildcard matching and i threw in an 'other' category if you get unexpected values.
if( wildmatch([FieldName],'Event*'),'Event', if( wildmatch([FieldName],'Training*','Training','Other'))
Most likely you will need to add a delimiter to create the hierarchy or to create a Group type column and use that instead.
The list box has a option called "Show as TreeView" its default delimiter is '/'
Not sure if this s was you want, first list box has expression rather than a field
=pick(wildmatch(Item, 'Event*','Training*'),
'Events', 'Training')
Great response to use an expression, thank you.
Can I use =([Activity.Type]='Event - rock climbing', 'Event',) etc?
It doesnt seem to be working?
Hello Stephen,
You can also create a map to a new field with these categories "grouped" if you expect these categories to grow over time, this would make it easier to maintain, not sure performance wise if would be a better solution. Please see the attached sample.
Regards,
Enrique
You may use the expression
=Trim(SubField(Field,'-',1))
for the listbox to get the desired outcome.
If you looking for an expression type solution vs script as suggested try what NagaianK posted in his reply.
you can but you need to use nested IF()
if( [Activity.Type]='Event - rock climbing', 'Event', if ( <condition> , true result value, false result value) )