Setting visibility based on multiple parameters

Hi - Is it possible to set visibility settings using multiple values. For example if there is a drop down (8 values) field which should be visible for only 3 values.
Any kind special character can be used?
Workaround can be grouping them but wanted to know if anyone used multiple entries for visibility.

Thanks

Well, straight answer is No. Only one condition is allowed to change visibility. But I managed to create a minor workaround for it on my app.It wasn’t simple initially but it works well for my app.

So basically, I have a list of activities a user can choose and a ‘green check’ has to appear on the activity if the user chooses the activity…also only if the user belongs to a certain profile. (for ex, men cannot attend baby showers). So I added multiple ‘hollow checks’ to the list.

First criteria for the ‘hollow check’ to appear is the profile criteria.One set of ‘hollow check’ if user is male and a second set of ‘hollow check’ if user is female. I then placed a ‘green check’ next to it and changed visibility on selection. Needless to say, the ‘hollow check’ would disappear if selected.

This worked for me only because I had only 2 conditions. I think for more than 2 conditions, I might have needed more hollow checks and the list would have been chaotic.

Hope to have helped.

@KNV you can “stack” visibility rules by assigning them to layers and using grouping (1 viz rule per layer). I show how I use this technique in this video below to create a smart onboarding overlay for guiding new users through the steps in my app to get their first win. HTH. You can read a full write-up I did on this technique here.

3 Likes

Thank you @Arun and @grid7

Great post. Very clear and informative. Thanks!

1 Like

This is Awesome!! it solved a big problem for me! Thanks :slight_smile:

cheers. glad it helped.

This group visibility solution doesn’t seem to work with action buttons.

Action buttons will always be visible according to their own visibility rules regardless of the rules of the group they are part of.

Has anyone else run into this?

@grid7 - in your video it seems to show an option to “add skills filter” , similar to how it is available in the list settings. I am unable to find or see that option - when I am working to change visibility, I see only the 3 inputs as shown in the original post (dropdown to select variable, dropdown to select operator, and dropdown or input to add a single condition).

What’s going on here? Is there something I’m missing?

Also, the solutions provided here (using layers with different visibility rules, using the transparent .png as in the video) provide a decent hack to make for “AND” conditional visibility functionality, meaning you can set a component to be visible if ALL conditions are met. However, my specific use case requires an element to become visible if either of 2 conditions are met, basically an “OR” functionality. Is there any known way to accomplish this in Adalo?

Specifically - I have 2 fields in my “User” collection that define authorization for operating machinery - one field is “General Authorization”, which defines whether or not they have received the general training and certification to operate the machines. A second field is “Machine Ratings”, which is a relational field to a collection of machines. This defines whether or not the user has been rated/authorized to operate a specific machine.

When viewing a Machine Profile, I want the user to see an alert that they are “not authorized to operate this machine” IF they are EITHER not generally authorized OR if they are not rated on that specific machine.

Any thoughts?

PS: @PrincipledPeter - I am not experiencing that issue when using “Groups” to add visibility layers. Buttons seem to be behaving the same behavior as any other component.
NOTE: I would wait to hear from @grid7 before you take my word for it, but I am suspicious that the video posted by him in this thread might be out of date - the “group layering” functionality to add multiple visibility rules is way cleaner and easier than putting in transparent png’s, so I’m thinking maybe that functionality didn’t exist when the video was made.

Try using layers to stack visibility rules - you can select any element or existing group, click the 3 dots in the upper-right of the left panel, and select “Make Group”. You can make a group in a group in a group, and so on to infinity. And, each “group” layer can have it’s own visibility rule. Note that, as I said above, in my experience this can only be used to give AND functionality on your rules, meaning all the rules’ conditions must be met for your element to become visible. Don’t know about getting some kind of “OR” functionality working…

(Edit - @PrincipledPeter I re-read your prior comment and realized you clearly said you WERE using the Group functionality to create visibility layers. my bad. Well, in that case all I can say is that I was not able to replicate the problem)

@tbtilton I made another thread about the problem with a cloneable app link: Group visibility when it contains action button

@PrincipledPeter yeah that’s legit. I have to apologize, my comprehension skills seem to be on pause this morning. You clearly said “Action Button”. In my apps, I was using just “buttons”, and when I tested I just used a “Button”. Your cloneable app demonstrates the bug well, and I DID replicate the bug in my own app.

On an aside, is there any real difference between using an “Action Button” and a “Button”, outside of some slight formatting differences? Furthermore, Is there any functional downside to just using an ellipse + Icon grouped to make an “Action Button”? What is the component really for? Just a convenience thing for making an app quickly? I’m curious because I’ve got hundreds of hours into building my app in Adalo and I literally never have used the “Action Button”… even though I have a lot of things in my app that look like an “Action Button”, and work like an “Action Button”, I just literally have never used that component because it is super limited in terms of how it looks - can’t modify the shadow, add border, etc.

Not an excuse for them to not fix the bug, but at least it SEEMS like this one has an easy work around: just don’t use that component when you are layering visibility rules, use a regular button or a “custom” action button made from an ellipse+icon.

But yes - you are not crazy - this seems to be a bug :wink: :+1:

1 Like

I’m not entirely certain but I think the action button floats always on screen regardless of scrolling while the regular button stays aligned to the other components on screen moves with the scroll.

Ah, yes. Seems that way. Another thing I’ve just done by anchoring my “always on top/no-scroll” buttons to the top or bottom of the screen.

That functionality probably has something to do with why it’s funky on it’s layered visibility rules. I know that the top/bottom anchoring system gets really weird with it’s behavior when you start having visibility rules mixed in…

But, I do see the value in an easy “drop-in” button component that stays put w/r/t scrolling. Definitely easier than my top-bottom anchoring strategy. BUT, with that extra work, my buttons are customized and look wicked. haha.

Sorry to uselessly bump this post, but I’m at a bit of a standstill until I can figure out if there’s a way to run “OR” visibility logic on an element at this time or if I need to just do without. Anyone have any ideas? See my post from couple days ago for full explanation.

2 Likes