Searching using multi dropdown - possible/alternative? Incompatible type

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.

Updating to include quick link to editor

1 Like

The dropdown will select a SKILL and the User’s skill list is a list of Skills, so, doesn’t:

User's skills contains input's skill

work? It should.

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?

Hi, @mattb… I just did a quick test, and I didn’t have a problem filtering a repeating group using a multi-select dropdown. Is this the general idea…

… and if you remove one of the options in the multi-select, the associated records are no longer visible?

If so, here is the constraint I used for the repeating group’s search…

Sorry if that isn’t what you are going for… definitely don’t like to waste people’s time. Hopefully it helps, though.

Best…
Mike

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.

multirpissue

I need the RP to look at the multi dropdown entries and match them with users that have the same skills.

1 Like

I’ve been battling this same battle, found a solution, and I’ve been thinking about documenting it.

Short answer: you will have to use the Advanced filter. Something like: This user’s Skill is in Multidropdown list of value.

(Please nudge me if I haven’t replied by Sunday. Thanks for allowing me to use you as my accountability buddy.)

1 Like

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. :slight_smile:

Hope this helps.

Best…
Mike

4 Likes

Thanks, I’ll give it a shot shortly. @rico.trevisan please remind me to remind you :upside_down_face:

Don’t worry, gents… I will remind Rico to remind Matt to remind Rico because I, too, am interested in seeing Rico’s solution. :wink:

2 Likes

@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 :wink:

I updated the above editor test 5 to show these results.

2 Likes

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.

ok, so that was a simple (but slightly hacky) fix. I added a count for the values added to that input and now it’s working.

resolve 1

3 Likes

Haha! I love it.

So, I was almost correct. I don’t use is in but contains. Here’s a screenshot:


Let me explain what I have.

I’ve got 3 key Data Types (née Things)

  • Question
  • Answer
  • Assessment

An Assessment has multiple Answers.
An Answer is related to 1 Question.

Let me explain this in a video.

10 Likes

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. :slight_smile:

@rico.trevisan, great stuff… thanks so much for making the video… really appreciate it!

1 Like

So I’m reasonably happy with what I have now (UI aside):

3 Likes

That looks awesome, man… congrats!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.