Here is a situation that seems super simple. Learning Adalo by constructing a simple chat app. The challenge is to split the process between creating a first dialogue between logged in user (me) and a current user. This challenge raised due to difficulties with “sometimes” advanced option of CREATE button. So instead of using “sometimes” option for CREATE button I decided to look for an alternative split way.
Here is an option. Two buttons: “Start chat” and “continue chat” are both placed next to a current user profile avatar. The trick is that those buttons are only visible one by one. If no entries in the “dialogues” database yet for the logged in user-current user couple, then “start chat is visible”. If at least one entry is there, the “start” goes invis, and “continue chat” show up.
To make that happen, and to start with first conditional check, I used following logical condition, same for both buttons:
“START CHAT”
Change visibility - sometimes
Current User - Dialogues - Count
Less than
1
“CONTINUE CHAT”
Change visibility - sometimes
Current User - Dialogues - Count
Is greater than
0
To be sure of the value during the Preview process I created also magix text with same “Current User - Dialogues - Count”, so it prints the value on the same screen
And, in the “Dialogues” database, there is just one entry, being “Rus-M1”. Rus is the logged in user. So there is one entry for M1, and zero entries for M2.
Same count (1 for M1, 0 for M2) displayed during the preview on current user profile screen.
And, most interesting, while the “START CHAT” button shows up for M2, and continue chat button is not visible for the M2, then for the M1 none of the buttons are visible. That makes me feel severe headaches to figure why.