Custom action issue

I am trying to add an increment to the profile table from another table.
I can find the action to open user profile screen and to the column I want to add to.


Then when I go to the next action

The columns are from the current sheet.
How do I add 1 to the user profile FX visit column?

You don’t have a way to increment through a relation.

The only way is to have a lookup on that relation, return the value in question, have a math column to add 1 to it, then in the action use a set column to set that value back to the “FX visit” column.

What exactly are you trying to do in this context though? Do you only want to access the user profile’s value or you want them to open the user profile screen?

Hi
When the user clicks a button in a screen which takes the user to another screen, to add one to the column “FX visit” in their line in the user profile …

Which specific screen should this be? Do you want this to be the User Profile screen?

Hi
No
I want to press button on A
Put the value (add one) into the FX column in the user profile
then go to screen B

In order to achieve that, you would need to:

  • Create a single relation between Table A and your User Profiles table. An easy way to do that is:
    • create a template column in Table A and fill it with the email address (or RowID) of the currently signed in user
    • join that column to the corresponding column in your User Profiles table to form the relation
  • Use a Lookup column to retrieve the current value of FX, via that relation
  • Use a Math column to add 1 to that column

Then when your user taps the button on A, your custom action can do a Set Columns on FX in your User Profiles sheet, via that single relation, and using the value of the math column to set the incremented value

This workaround is required because it is not possible to directly apply an Increment via a Single Relation.

Wow, that does sound ultra complicated…
Perhaps I should put the button in the user profile table !

In another app, I have the count column in the user profile table and using the custom action - increment, it just increase the count in that column by one each time the button is pressed and then takes the user to another page.

Yes, if you’re starting from a screen that is using the User Profiles table as its source, then it’s easy, and you can directly increment the column.

But the use case you described was somewhat different, and hence the workaround.

Ah yes I appreciate that and I am thankful for your excellent hep and advice - I will try and do as you have suggested, I’m a bit slow on the uptake sometimes!