I’m trying to set up a multi select using Wappler’s select and a couple of arrays. It’s working really well for a Create form, but for Updating I want to restrict the list of choices to exclude those already selected.
Say I have a list of options 1,2,3 coming from server connect “getPermissions.data.getPermissions”.
Of the options (1,2,3) number 1 is already allocated and listed in “arrPermissionsSelected.items” so I want to show 2 and 3 in the select which references “arrPermissionsSelection” as it’s source.
The code above gets me 1 as it uses inarray. If there was the option of NOT inarray it would give me what I need, 2 and 3…but that’s not an option I can see? Is there any way of achieving this?
The array arrProgrammesSelection currently returns ALL programmes, I would like for it to exclude the programmes listed in arrProgrammesSelected. The on:change event in the select and on:click event in the badges manages the arrays on user interaction, it’s just looking for a way to populate the initial lists.
This is the kind of thing I think the array binding should look like, if I could just change the inArray to NOTinArray!
If anyone has any suggestions I’d be really grateful! I’ve tried not equal, it show the list perfectly to start but once a selection is made it only updates to the current selection. I think it would be achievable through flows but seems like a sledgehammer to crack a nut!
I think there is a better way to compare between two array for a NOT IN ARRAY comparison rather than using nested loops.
See if you can find anything on Google. This is just a rough code I have written.
You need to replace the local version of the dmxFormatter.js in your project and upload it to your server.
Not sure what has this to do with the additions added by Patrick in the zip? It's adding a Not In Array option which has nothing to do with any German characters.