Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confiforms: Find unselected values from a smart multi-select field?

Wade Meredith September 3, 2020

I'm trying to determine what's been unselected from a smart-select field on update. (So I can use that value elsewhere.)

My approach has been subtracting the current state from the previous state so I will be left with any values that were unselected.

I've gotten pretty far by looking up the previous state of the smart multi-select, converting it to a list, and then subtracting the current state with replaceValue. If I manually enter a string in the replaceValue function, it works. But I can't seem to get replaceValue to accept a dynamic value (current state) as the search string.

Example:

somefield=[entry._previousState.someSmartMultiSelect.transform(id).asList.replaceWith([entry.someSmartMultiSelect.transform(id).asList],)] 

First: Can replaceValue take a dynamic search string?

Second: Is this the best way to find the ID's of the unselected records in a smart multi-select?

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
September 4, 2020

Hi

1. At the moment it does not

2. Probably, using "asFilteredBy" virtual function - https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions. But it looks like it does not accept dynamically evaluated expressions.

I will register these are feature requests

Alex

Wade Meredith September 4, 2020

Thanks. I would love to see these features make the Confiforms plugin even more powerful.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events