Trigger action when a new user uses the App.

Hi, I would like to trigger a certain action automatically when my app is used by a new user. Is this possible?

Solved Solved
0 5 287
2 ACCEPTED SOLUTIONS

Not per se. You can set up a sort of onboarding view that requires the user to register themselves before any other view becomes available.

View solution in original post

Hey, I'll share what worked for me. I'm still fairly new so very likely there are improvements to make to my setup.

1-Setup a table called "User_Management" that includes the email, name and role (admin/user). Import this to the AppSheet project. Email can be the key field

2-I needed my app to be bilingual, so to have the instruction in both languages, i have a table called "Settings" with fields "Settings category", "Title_En" and "Title_Fr". In this row, Settings category = "Add New User", and in both Title fields, i add a quick instruction to click the button above to start the app. I can add a virtual column to select which "Title" column's value depending on the user's language setting.

3-I'll need a slice of the Settings table that will filter so the only data is the "Add new User". So [Settings category] = "Add New User".

4-I create a View called "Landing Page" and this is of type Detail, which will just show the records from the "Add New User" slice. Since there is only 1 record, i just see the instructions to click to start the App.

5-Create an action to add new user, apply to Settings, and "Do this": "Data add new row to another table using values from this table". Email = UserEmail(), Role = "User", I also get their name from their email, using string formulas like left, mid, find, etc. In the "Only if this condition is true" parameter, i have this formula: isblank(Select(User_Management[Email],([Email]=userEmail()))).

6-I create another Action that will just go to another view within the app, the main view of my app.

7-I create a final action that groups both the add new user action and go to main page action. This is the action that i show in the landing page (detail view of setting table which is filtered to only show 1 record, the add new user record). For this grouped action, i change the display name so it'll be different if you're already a user or not with this formula:
if(isblank(Select(Filter[Email],([Email]=userEmail()))), "Add New User", "Start")

That did it for me. Hope this helps!

 

View solution in original post

5 REPLIES 5

Not per se. You can set up a sort of onboarding view that requires the user to register themselves before any other view becomes available.

My end goal is to have a database table that has a row for each user; one of the columns from this database has the email of the user. If I were to setup a view with a "start" button (to trigger my action), is it possible to only trigger the action of adding a row if there is not already a row with the user's email?

Definitely

@Marc_Dillon  Could you explain in a bit more detail how this can be done, please?

Hey, I'll share what worked for me. I'm still fairly new so very likely there are improvements to make to my setup.

1-Setup a table called "User_Management" that includes the email, name and role (admin/user). Import this to the AppSheet project. Email can be the key field

2-I needed my app to be bilingual, so to have the instruction in both languages, i have a table called "Settings" with fields "Settings category", "Title_En" and "Title_Fr". In this row, Settings category = "Add New User", and in both Title fields, i add a quick instruction to click the button above to start the app. I can add a virtual column to select which "Title" column's value depending on the user's language setting.

3-I'll need a slice of the Settings table that will filter so the only data is the "Add new User". So [Settings category] = "Add New User".

4-I create a View called "Landing Page" and this is of type Detail, which will just show the records from the "Add New User" slice. Since there is only 1 record, i just see the instructions to click to start the App.

5-Create an action to add new user, apply to Settings, and "Do this": "Data add new row to another table using values from this table". Email = UserEmail(), Role = "User", I also get their name from their email, using string formulas like left, mid, find, etc. In the "Only if this condition is true" parameter, i have this formula: isblank(Select(User_Management[Email],([Email]=userEmail()))).

6-I create another Action that will just go to another view within the app, the main view of my app.

7-I create a final action that groups both the add new user action and go to main page action. This is the action that i show in the landing page (detail view of setting table which is filtered to only show 1 record, the add new user record). For this grouped action, i change the display name so it'll be different if you're already a user or not with this formula:
if(isblank(Select(Filter[Email],([Email]=userEmail()))), "Add New User", "Start")

That did it for me. Hope this helps!

 

Top Labels in this Space