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?