Checkbox Set Selector

Hi all, I am using checkbox set selector. It contains list of some entities with checkboxes. There is onChange settings where I can use microflow. If I hit some checkbox do I know on which record was it checked? There is also "Listen source" property in properties, but I dont understand how to use it. Regards, Lukas
4 answers

When you check or uncheck the reference set selector displayed in a data view, you are actually setting the reference set between 2 entities in your data model.

The On Change microflow has the containing object as a parameter, so as its first action, your microflow can retrieve the linked records using the association. Your microflow logic can then do whatever you need based on which records are linked in the reference set.

I have never used the listen target feature, but I guess it may allow you to set the association without opening a data view of the object, but using a row in a datagrid??


The listen source lets you connect it to the form loader in a way similar to a listening dataview.

The checkbox selector gets an onclick on the name that sends the object to the formloader which can then show a dataview of that object.

Edit: Custom widgets can only call a microflow with one object. In this case a choice was made to use the enclosing dataview, as you can retrieve the (not yet committed) association that way. You can retrieve the db refset and compare this with the new version to get your selected object.


Because comment is not so long I am writing here for clarification.

David, yes as you wrote we are making reference between TWO entities. In the microflow there is only one entity as parameter. Yes I can retrieve objects which has relations to my parameter, but this is not what I want. I want just that one object I am checking, because only for this object I want to make some operation. If I get a list of objects which has relation to my parameter from the list I dont know which one was that I checked.

Or do I know somehow?


You can achieve this Lukas. Imagine Object1 with Reference Set to Object2

In your microflow, a retrieve action from Object1 association will give you the NewListObject2. If you then perform a retrieve from the database for Object1 where id = $Object1 (first record only, lets call it OldObject1), this will give you the original database values. You can then retrieve from the OldObject1 association to give you a second list of OldListObject2 which was the value before the current event,

You can then do a list operation (subtract OldListObject2 from NewListObject2) to give you a list of objects added. If this list is empty, you can subtract NewListObject2 from OldListObject2 to give you a list of objects removed.

Both these 'difference' lists will actually be only one object.

Hope this helps