Update Data on a Table, When other table create new entry

Hi guys Im doing a fitness app.

Table 1 Columuns are:
Users - Weight

Table 2 Is a Register of many diferent weight mesures per user in different dates:
Date - User - Weight

I wanna update Table 1 Weight (Per user) auto-updating last weight mesured

Example:
Table 2
15/7 Juan - 230lbs
15/8 Andres - 255lbs
15/8 Kevin - 165lbs
15/9 Juan - 228lbs
15/12 Andres - 156lbs
15/30 Juan - 220lbs

Table 1 AUTO UPDATE LAST WEIGHT PER USER:
Andres - 156lbs
Juan - 220lbs

How May I do it? THANKS!

Solved Solved
0 2 94
1 ACCEPTED SOLUTION

Hi guys I finally got it!

There are 3 Major WAYS TO ARCHIVE THIS.

#1 ACTIONS
By far the best and most elegant one.
Appsheet have this amazing feature, when you create a FORM VIEW you can program an instant ACTION TO EXECUTE when it is saved. (behavior option at the end of the view/form menu)

So you create an action for TABLE 2 with the โ€œEXECUTE AN ACTION TO A SET OF ROWSโ€
and you select TABLE 1 as a TARGET TABLE then you select which rows you wanna change.

You will need to create other action for TABLE 1 to actualy change the TABLE 1 Data.

So you create an action for TABLE 1 โ€œSet values of some columns in this rowโ€
And you program some formula like this:

Select(Table2[id], condition, etc etc )
or may be MAXROW or anything to acces the new TABLE 2 DATA

THEN YOU LINK BOTH ACTIONS.
YOU CAN MODIFY THE VALUE ON TABLE 1 WITH A FORM OF TABLE 2

Other not so cool solutions:

#2 SPREEDSHEET FORMULA
Its kind of hard to figure it out at the beginning but it is really powerful and I believe it save you some processing for heavy formulas

Table 1 may have a constant FORMULA to refer TABLE 2
SORT() - FILTER()- and INDEX() are the essential functions

#3 USE VIRTUAL COLUMN
Use a virtual column on table 1 that is linked to table 2 via some formula
the problem is you are not able to โ€œsaveโ€ the result in table 1 easily

#4 USE WEBHOOKS
I dont know anything about it yet, but I have seen it is possible

View solution in original post

2 REPLIES 2

Hi guys I finally got it!

There are 3 Major WAYS TO ARCHIVE THIS.

#1 ACTIONS
By far the best and most elegant one.
Appsheet have this amazing feature, when you create a FORM VIEW you can program an instant ACTION TO EXECUTE when it is saved. (behavior option at the end of the view/form menu)

So you create an action for TABLE 2 with the โ€œEXECUTE AN ACTION TO A SET OF ROWSโ€
and you select TABLE 1 as a TARGET TABLE then you select which rows you wanna change.

You will need to create other action for TABLE 1 to actualy change the TABLE 1 Data.

So you create an action for TABLE 1 โ€œSet values of some columns in this rowโ€
And you program some formula like this:

Select(Table2[id], condition, etc etc )
or may be MAXROW or anything to acces the new TABLE 2 DATA

THEN YOU LINK BOTH ACTIONS.
YOU CAN MODIFY THE VALUE ON TABLE 1 WITH A FORM OF TABLE 2

Other not so cool solutions:

#2 SPREEDSHEET FORMULA
Its kind of hard to figure it out at the beginning but it is really powerful and I believe it save you some processing for heavy formulas

Table 1 may have a constant FORMULA to refer TABLE 2
SORT() - FILTER()- and INDEX() are the essential functions

#3 USE VIRTUAL COLUMN
Use a virtual column on table 1 that is linked to table 2 via some formula
the problem is you are not able to โ€œsaveโ€ the result in table 1 easily

#4 USE WEBHOOKS
I dont know anything about it yet, but I have seen it is possible

Top Labels in this Space