i cant find a title for the issue im dealing with!

its a wired issue that im encountering and im hoping someone can be helpful, ill simplify my app to just focus on the feature that im having issues with.
I have a [hour] column which is represented in a range slider from 0 to 23 the 

Initial Value formula for column Hours (Number):

IF(

[Midnight Reset] = "๐Ÿ•—",
HOUR(
IF(
[Time Reset] >= TIME(NOW()),
[Time Reset] - TIME(NOW()),
"24:00:00" - (TIME(NOW()) - [Time Reset])
)
),
23
)

[minute] column also represented in a range, from 0-59.

 

Initial Value formula for column Minutes (Number)

IF(
[Midnight Reset] = "๐Ÿ•—",
MINUTE(
IF(
[Time Reset] >= TIME(NOW()),
[Time Reset] - TIME(NOW()),
"24:00:00" - (TIME(NOW()) - [Time Reset])
)
),
59
)


[Time Reset] which i manually select a time, and its a fixed time
[midnight reset] when is enum and always "๐Ÿ•—" when enabled..
and finally [Datenow]
the idea of the above code, is to take the difference between time now and the time in [Time Reset], breaks it down to hour value and minute value.
so for example.
if timenow (or the time i edit my form or make a new form) is 2:00pm
and the [time reset] is manually set to 3:30pm. then the [hour] range will output "1" hour and the [minute] range will output "30" minutes. 
now here comes my issue.
this only works when i create a new form. when i select a time for the [time reset], i can dynamically se the [hour] and [minute] updating accordingly. BUT when i manually select the range of either [hour]  and then update [time reset] then the [hour] no longer dynamically updates.
and this issue also is valid when i save the form and go back to edit it, no matter what time i input for [time reset] i still dont see [minute] and [hour] dynamically change. to which the initial idea is for them to update automatically when i edit the form, as timenow updates, so as the [hour] and [minute] should update.
anyone with an advice oh how to make it update even after editing the form? 
heres a video i upload that visually explains the issue.
https://www.vidble.com/watch?v=K8FvYEJiVigOFvOhAWBvEHEsYUBvn1E0
Solved Solved
0 3 93
1 ACCEPTED SOLUTION


@marvaddi wrote:

BUT when i manually select the range of either [hour]  and then update [time reset] then the [hour] no longer dynamically updates.


Initial value as the name suggests is an  "initial " value till the app user changes it or overrides it. Once the app user changes it, the initial value expression will not work within the same form edit session. It will also not work for subsequent form edit sessions unless "reset on edit" setting  is enabled that is described below.

Define app formulas and initial values - AppSheet Help

 


@marvaddi wrote:

when i save the form and go back to edit it, no matter what time i input for [time reset] i still dont see [minute] and [hour] dynamically change.


For this you could try "Reset on edit" option. You could even define suitable expression for the reset on edit option. 

Configure column properties - AppSheet Help

 

 

 

View solution in original post

3 REPLIES 3


@marvaddi wrote:

BUT when i manually select the range of either [hour]  and then update [time reset] then the [hour] no longer dynamically updates.


Initial value as the name suggests is an  "initial " value till the app user changes it or overrides it. Once the app user changes it, the initial value expression will not work within the same form edit session. It will also not work for subsequent form edit sessions unless "reset on edit" setting  is enabled that is described below.

Define app formulas and initial values - AppSheet Help

 


@marvaddi wrote:

when i save the form and go back to edit it, no matter what time i input for [time reset] i still dont see [minute] and [hour] dynamically change.


For this you could try "Reset on edit" option. You could even define suitable expression for the reset on edit option. 

Configure column properties - AppSheet Help

 

 

 

so you are telling me i was one toggle of a switch away from happy tears? haha, thank you so much!

You are welcome.

You are correct. Many times that "one toggle of a switch away" turns into running the the last mile to win the race.  ๐Ÿ™‚