Rating Button Visibility

Hello Adalo team,

My application allows two users to exchange items. After the exchange, they can rate the items and leave reviews. Initially, I set the button’s visibility to “disappear when the item status changes to ‘rated’”. However, the problem is that the button disappears after one user rates it, preventing the other user from rating it. Is there any way to make the button disappear only after both users have rated it? Thank you.

Hi @Vicky

Maybe its much better that you use count especially if you wanted other users to rate it.

example:
Log-in User > Reviews > Count
Filter: Add a filter where Item > ID is equal to Current Item > ID.
Setting: Set it to be visible only if this is equal to 0.

also you can use button states. and name the button “rated” if equal to 0 or “leave a review” if not equal to 0.

Hi @anthony25

Thank you for the response. I will try and see if this works:)

Thank you.

Hi @anthony25

It seems to be working fine, thank you! However, I have another question… I have a list displaying all transaction records. Each column displays different conditions, and the buttons displayed depend on these conditions

*Condition: Confirming; Button: (None)
*Condition: Exchanging; Button: Complete exchange
*Condition: Completed; Button: Rating
*Condition: Rated; Button: (None)

It seems I can’t add other conditions to the button visibilty. Is there anyway to do it?

Thank you.

1 Like

Hi @Vicky

Glad I could help! I hope I understood the situation correctly. Handling that multiple conditions is definitely tricky here. At most, you’ve got about three conditions that you can cleanly set, otherwise, you can try grouping the button inside a rectangle and giving that rectangle its own visibility condition.

Or, you can also do it the “old way” by stacking buttons on top of each other (i think there a tutorial for this. but its really messy).

Just remember that the conditions must follow a specific order, like the rectangle (or group) must meet its condition first, or nothing inside it will show at all!

@Vicky if you’re using Buttons, they have states. A button can have up to 3 states - this may be helpful in your case. You can find examples in Adalo Help. Also I’ve made a video about states: https://youtu.be/eTlm8oZRUbg.

Best,
Victor.

Hi @Victor

Thank you so much for sharing. I had never heard of State functions before, so this was really helpful. My situation is that I still need to set up two buttons. I’ve placed the two buttons together like this:

Initially, when the first button disappeared, the second button would take its place. However, after some adjustments, the second button is no longer taking the place of the first button. Do you know what might be causing this?

Video1: https://drive.google.com/file/d/1Em62M3KaMiPHKF2CL5LoNvbEbuVYLimI/view?usp=sharing

Video2:https://drive.google.com/file/d/1KGb8K5f6PQodVBG_Yji5tr4AzgAeGE5z/view?usp=sharing

Thank you.

@Vicky based on your earlier requirements, you have 4 conditions:

So you set up the button states like this:

  • original state - just make the button invisible / disabled / whatever
  • state 1 - shown when Condition == Exchanging, button title = Complete exchange
  • state 2 - shown when Condition == Completed, button title = Rating

Best,
Victor.

1 Like

Hi @Victor

I may not have described the problem clearly. My problem is that I set up two buttons, but the second button is not correctly occupying the position of the first button. Please watch the videos below.

Video1 (normal): https://drive.google.com/file/d/1Em62M3KaMiPHKF2CL5LoNvbEbuVYLimI/view?usp=sharing

Video2 (with issue):https://drive.google.com/file/d/1KGb8K5f6PQodVBG_Yji5tr4AzgAeGE5z/view?usp=sharing

Thank you for your help!

Best,
Vicky

@Vicky this is a completely different problem. Are we still talking about optimising visibility?

I would advice to check your layout: button grouping, whether they touch each other or not, etc. Worst case you can place one button on top of the other (looks ugly and very difficult to manage, but it provides the best UI result).

That is why it is better to use button states instead of having multiple buttons with visibility conditions.

Best,
Victor.

Hi Victor,

I tried button states, but it seemed I couldn’t accomplish the functionality I needed with just one button, so I set up two buttons instead. During testing, I found that button two didn’t quite replace button one’s position, even though I was certain they were close together. I will submit a forum and see if this issue can be fixed.

Thank you and have nice day!

Best,
Vicky

Hi Vicky, try by placing Button 2 exactly on Button 1. Same positions. It’s harder to work on them, but you can select the Button 1 from the Components list in your screen from the left panel. But again, double state would be the best solution, with only one Button, as Victor said. What’s blocking you from using it?

Best
Eugen

1 Like

Like Victor mentioned :backhand_index_pointing_down:

ezgif-8b22317c01d9b38c

Thank you and have a great day!

Hi @Eugen

Thanks! I do use button state. However, The visibilty of two buttons are different and I don’t know how to use only one button state to do it. Below are my setting:

*Green Button: Complete exchange (by changing button visibility)
Button Visibility Setting: The condition of exchanging item is equal to “Exchanging”

*Yellow Button: Rating/ Rated (by changing button visibility and using additional state)
Button Visibility Setting: The condition of exchanging item is equal to “Completed”
**
Rating:**
Log-in User > Reviews > Count
Filter: Add a filter where Item > ID is equal to Current Item > ID.
Setting: Set it to be visible only if this is equal to 0.

Rated:
Log-in User > Reviews > Count
Filter: Add a filter where Item > ID is equal to Current Item > ID.
Setting: Set it to be visible only if this is equal to 1.

Thank you :grinning_face:

Best,
Vicky

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.