User registration with different actions

I am trying to use a page in my app (frontend) to register users into my backend system. I have a spreadsheet that records user info which is then passed through to the backend via cloud functions on the Google Cloud Platform.

Ideally, if the current logged-in user hasnโ€™t been recorded in the table yet, then an โ€œAddโ€ action would be present such that they can register with their info. If the current user however has registered prior, an โ€œEditโ€ action would be present such that they can change whatever info they previously inputted.

This is similar to a question that I had asked previously, namely this but the solution here doesnโ€™t seem to work anymore. That is, Iโ€™m using

ISBLANK( FILTER( table , [email column] = USEREMAIL() ) )

for the โ€œAddโ€ action and

ISNOTBLANK( FILTER( table , [email column] = USEREMAIL() ) )

for the โ€œEditโ€ action. But this only seems to work with the โ€œEditโ€ action on not the โ€œAddโ€. In other words, if a user is brand new to the app, they canโ€™t register their info. Any particular reasons as to why this may be happening?

Your help is appreciated!

Solved Solved
0 4 434
1 ACCEPTED SOLUTION

@Steve Thanks for the info.

I switched to a card view and that seems to have solved the problems. The method of having actions with conditions such as

IF (IN(USEREMAIL(), alpaca_keys[user_id]), true, false)

or those described in the post I linked earlier all work for this situation.

View solution in original post

4 REPLIES 4

I passed this case just recently. My solution is:

  1. Change the Add button which it generated by system to โ€œDo not displayโ€
  2. Create the new one with Do this: go to other view within app
  3. Set Target = Link to form which it is the form for creating user informations.
  4. Assign it into a virtual column which is called โ€œAdd more productโ€ - in your case it should be โ€œRegister hereโ€.

From Vietnam with love

Iโ€™m afraid this doesnโ€™t really work. If I preview the app as a user that is not in the system, the add action is nowhere to be seen.

For example, bhairav.valera@xxx has already been logged into a keys table. As such, the add user button shows up (we donโ€™t really want this to show up here, but it is there nonetheless) as well as the edit user button (we only want to allow existing users to edit, not add).

3X_d_7_d7d7fd75d9d4b9708b546600b3c26c1117dd5178.png

If however, I preview the app as another user that is not currently in the system, the add button doesnโ€™t show up

3X_4_a_4acd220710bdfe7c5981f245a43b3e652b2e62b1.jpeg

Profile details donโ€™t show, which makes sense, but the add button should still appear correct? Iโ€™m not sure why this is the case.

Additionally, Iโ€™ve tried using show-if conditions for the action such as

IF (NOT(IN(USEREMAIL()), keys[user_id]), true, false)

which should only display a particular action depending on whether or not the current user_id is in the keys table or not, but this also doesnโ€™t seem to work.

Thoughts on this?

A detail view will only display overlay buttons if there is a row displayed in the view.

@Steve Thanks for the info.

I switched to a card view and that seems to have solved the problems. The method of having actions with conditions such as

IF (IN(USEREMAIL(), alpaca_keys[user_id]), true, false)

or those described in the post I linked earlier all work for this situation.

Top Labels in this Space