This has been driving me mad for the last few days. I’m trying to find a neat way of showing search results in an RP based on several constraints.
I need to filter results based on the following:
Location + radius - I have this working
A list of skills the user has - This bit is driving me nuts
A user can have a list that contains up to 20 skills. The database is set up as follows:
Datatypes
skill (name is text)
User (list of skills)
The RP group is searching on the User datatype and ideally, I would like to have a constraint that reads something like “This users skills contains Input Multi dropdown field’s skill name”.
When trying to add multi dropdown as a constraint, I’m been told that it’s an “incompatible type”, so my questions is - what is the best way of achieving this? I basically want a user to be able to search for users by skills (multiple skills), and add several entries into a field. The selections are then used as a constraint on the RP.
Thanks Keith. I’m afk right now, and I did try this with a “normal” drop-down. It’s the multi select drop-down I’m having an issue with. Perhaps it’s simply not possible to use that type of input field to constrain the RP?
Thanks for that. I don’t think I actually had the “is in” option, closest I could get was :contains. In any case, I’ll take a look tomorrow and post an tomorrow.
That isn’t going to work for me. I understand that each of your projects can only have a single value. They can either have New, Rejected, Waiting for approval or In Progress - they cannot have more than one value (i.e. not a list of status’s).
That would work for me if I’m trying to filter single items, but I’m trying to filter on a list of things.
Take a look at Test 5, this is where my issue lies.
I need the RP to look at the multi dropdown entries and match them with users that have the same skills.
I responded to your response, @mattb, but my “solution” was garbage because I didn’t test it properly. @rico.trevisan’s response set me off down another path (Thanks, Rico!), but I couldn’t get it to work because I don’t see is in as an option in my advanced filter. That being said, I played around with it a bit more and got the advanced filter to work with the following constraint…
Now, I admit that constraint might be a bit hacky, and Rico probably has a much better solution… but it does appear to work, and I believe I tested it properly this time.
@rico.trevisan I spent a few hours on this again and found it impossible to use the “is in” filter with an RP and list using a multi dropdown field constraint.
@mikeloc Agreed this is probably the best solution at this time and I came up with something pretty much identical (just used a different count). I’ll mark that as the accepted solution for now, unless @rico.trevisan can come up with something better
I updated the above editor test 5 to show these results.
Actually this is not working as required. It seems to be finding all users that have one of the selected items from the list (entry in the multi dropdown input). If you take a look at the editor link I sent, it displays users that have any of those values, rather than trying to find users that have all of those values.
Cool, thanks for taking time for the video, and getting me confused about an answers answer too.
This has actually got me thinking about the best way to present this to my users. Ultimately there are two schools of thought when it comes to filtering of this type:
The multi dropdown values are used to find any “thing” that has at least one of the values
The multi dropdown values are used to find only a thing that has all values
Regarding your answer, is there any real benefit over using a custom state to hold these values vs. an advanced filter on the repeating group?
Going forward I’m now considering a “match all” toggle in the search area to create a condition on the repeating group that will change the filter from thing:count = multi dropdown:count to `thing:count is dropdown >= 1
@mattb, I had just assumed you were trying to accomplish the first bullet point, so if it helps at all, you have at least one data point that says a user was expecting it to work that way.
@rico.trevisan, great stuff… thanks so much for making the video… really appreciate it!