Help with expression for starting view

When opening my app I want to do the following:

If the user has a record in my USER table - by matching useremail() with USER.USERS_EMAIL
THEN open the form named LAUNCHER
OTHERWISE open the form named “ADD NEW USER”

Could someone help me with the expression?

I have some other steps to do when opening Launcher based on a specific value from the USER table but I can’t work on that until I get this expression working.

Thanks in advance.

Let me know if you need more info on what I’m trying to do.

Lucinda

1 10 297
10 REPLIES 10

Steve
Platinum 4
Platinum 4

Try:

IF(
  IN(
    USEREMAIL(),
    USERS[USERS_EMAIL]
  ),
  "LAUNCHER",
  "ADD NEW USER"
)

Perfect Steve. Thanks so much!

Steve, I created an action to open the Launcher form and set it on the Add New User - Form Saved event. I get the first error when clicking Save. If I say OK, I get the second error. The second error is probably due to the app being re-synced and loaded again.

How can I run an action on the form saved event and make sure the data is saved before it runs? I think that is the issue.

Thanks again.

More info. I turned Off the Delayed Sync option. That actually forced a sync, showing me the sync screen, then ended up with the same error messages as before. The only difference being that the new user record was saved before the first message appeared. But the action still couldn’t run.

These references to “app” suggest your action is targeting another app rather than a form within this app:

2X_5_54bba57482d7d1cfa7a757d32badf24557d06626.jpeg

What is the Target expression of your action?

I’m simply telling it to open my Launcher form. See photo.

That’s not actually how that works. You’ll need to use an expression that uses a LINKTO…() function, such as:



Thanks. I used LINKTOVIEW(Launcher) and it worked.

Is there any reason to choose LINKTOVIEW versus LINKTOFORM in my case?

LINKTOFORM() will create a new row in the table. LINKTOROW() will visit an existing row. LINKTOVIEW() will go to a view that isn’t row-based (e.g., deck, gallery, or table), or that infers the row.

Great. That explains it clearly. Appreciate it.

Top Labels in this Space