You are viewing limited content. For full access, please sign in.

Question

Question

Forms - calculation isn't firing when using field filled by lookup rule

asked on October 3, 2024

Hello,

I have a form with a table like below:

There are fields above this that are used in a stored procedure to return new rows to this table. The Time Decimal column uses the below formula to turn the Total Time column into a decimal that gets used to bill based on hours.
 

=PRODUCT(TIMEVALUE(INDEX(Fertilizer_Tending_Summary.Total_Time, ROW())), 24)

The stored procedure will populate the Total Time column, but unless I change the value that gets populated, the Time Decimal field calculation does not happen - it remains at 0. Is there anything I can do to get that calculation to fire when the lookup happens?

Thanks!

0 0

Replies

replied on October 3, 2024

I don't believe you can trigger the calculation after the lookup is complete on an append table (maybe with JS) but you could do the calculation in a sql view from your table with the following:

ROUND(DATEPART(HOUR, totaltime) + DATEPART(MINUTE, totaltime) / 60.0, 2) AS Time_Decimal

Populate the field from your lookup and use a number field instead of a single line field and make the decimal place to 2.

3 0
replied on October 3, 2024

Interesting, I will give that a shot. Thanks!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.