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!

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

3 Likes

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).

Screen Shot 2021-01-20 at 1.16.58 PM

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

Screen Shot 2021-01-20 at 1.19.17 PM

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.

1 Like