I'd like to calculate the age by month and I ...

I’d like to calculate the age by month and I use the App formula, It’s work. But my problem is I have to click Edit the data first then the age will updated. The App Formula is not run if I’m not do something with that data.

I’d like to see the updated age on screen with no any action with app and I could not click Edit every month all data. Would you please give me any advise? Thanks.

Please use a virtual column for these types of live calculations

Thank you @Grant_Stead

I’d like to reopen this topic
I’m using the following app formula in a VC to calculate the current age:

FLOOR((HOUR(TODAY()-[Date Of Birth:]))/(365.24*24.0))

The calculation works, however it doesn’t automatically update unless I edit the entry. I thought having this formula in a VC would force the app to recalculate the age with every sync.

Can somebody please tell me what I’m doing wrong?

That it doesn’t recalculate on each sync but does when the entry is edited suggests it isn’t a virtual column, but rather a normal column with an app formula. You’ll need to replace the normal column with a virtual column to recalculate at each sync.

Trust me, it’s a virtual column. See image below:

And all your other virtual columns update properly on sync?

None of the age virtual column update properly after sync. All other virtual columns update as they should.

That is…unexpected! I’m at a loss. Perhaps @Aleksi has an idea?

@Guillermo_Perez What is your account ID number and app/table name if I check it directly?

Hi @Aleksi my account ID number is 357445.
The app name is contacts and the table name is also named contacts.

Thanks for your help so far. @Steve thanks for trying to help.

1 Like

Maybe you have all considered this, but just in case; is your expression listed under auto compute App formula or Initial Value?

@Guillermo_Perez I checked your app and all calculations are correct for column “Age”. Are you able to add one temporarely fake record so I could change the date and see what happens then?

@Aleksi please look at TEST CONTACT.

This contact is now showing the correct age. I started out with the date 4/27/1965. This correctly calculates the age of 54. I then tried to update the date in the spreadsheet to 4/27/1966 to see what would happen after a sync. It correctly updated to 53.

I’m at a loss because one of my real contact’s date of birth is 4/27/1965 and a few days ago this should have automatically updated to 54, but it still remains at 53 unless I edit the entry. Please see the detail view and the form view below:

@Riki_Armstrong to answer your question, I placed the formula in App formula.

I’m wondering if this could somehow have something to do with the fact that I created a slice of this table to rearrange the columns as I saw fit. Although, this would be weird because i made sure that the slice allowed for adds, updates and deletes.

@Guillermo_Perez It would help to find out the reason if your app could be in that stage where the age is wrong after syncing. When you see that behavior, don’t open and save that record so it won’t change anything. When your app is in that stage, send an email to support@appsheet.com with details and we will debug the reason. For now it’s difficult because your app is not in that stage.

I have created another test contact with date of birth 5/7/2018. If tomorrow the age in the detailed view does not automatically change to 1, I will send an email to support.

Thanks for your help.

Thanks