Using INPUT() in Action of add a new row to another table using values from this row

I'm working on an app that allows product display and contacting sellers of the product. For this problem, there are two tables involved, Product and Message. I want user to click on Send Message button, and the Action will save several columns of values from this row in the Product table to the Message table, and along with a Message column that requires user to type in the value and save to the Message table also. I wonder whether there is any way to do that. For now, I'm using Action to add a new row to another table using values from this row and use INPUT() for the Message column but it seems to not work......question.png

Solved Solved
0 3 132
1 ACCEPTED SOLUTION

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Leonsk2037 

Yes, INPUT() fonction may comes buggy at a time.

I would suggest using a composite action "Execute a sequence of actions".

Hence::

- action 1 would perform the "add a new row" you already have

- action 2 would open the last row added with an action "open a view", with this expression:

LINKTOROW(MAXROW("yourTable", "_ROWNUMBER"), "yourtableFormView")

For reference:

Actions: The Essentials - AppSheet Help

LINKTOROW() - AppSheet Help

MAXROW() - AppSheet Help

 

View solution in original post

3 REPLIES 3

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Leonsk2037 

Yes, INPUT() fonction may comes buggy at a time.

I would suggest using a composite action "Execute a sequence of actions".

Hence::

- action 1 would perform the "add a new row" you already have

- action 2 would open the last row added with an action "open a view", with this expression:

LINKTOROW(MAXROW("yourTable", "_ROWNUMBER"), "yourtableFormView")

For reference:

Actions: The Essentials - AppSheet Help

LINKTOROW() - AppSheet Help

MAXROW() - AppSheet Help

 

Thank you so much! It's really smart to use _ROWNUMBER to tell which row was just added. It now works nice and smooth.๐Ÿ˜Š

You are welcome ! I'm glad you made it ๐Ÿ˜€

Top Labels in this Space