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

Question

Question

Invalid formula expression message upon submission when table row deleted

asked on March 22, 2018 Show version history

I have a process for reporting overtime hours for a group of employees. On the initial form, the requestor enters employee information in table rows including the estimated number of hours to be worked. The table then routes to the timekeeper, who enters the actual number of hours worked. There is a formula in the Hours Earned field that calculates the hours earned for each date depending on whether the time is overtime or comp time (multiplier of 1.5) or straight time (multiplier of 1). It works beautifully.

The problem is that if I delete a row (the employee ended up not working, for example) and try to submit the form,  I get a "Laserfiche Forms has encountered a problem...LFF1000-InvalidExpression" message. Initially I thought there might actually be an issue with the formula, but then I changed it to a very simple formula and got the same result.

Hours earned formula currently in table:
=IF(INDEX(Group_OT_Details_Array.OT_Type_Array,ROW())="StraightTimeA",MULT(INDEX(Group_OT_Details_Array.OT_Hours_Worked_Array,ROW()), 1),MULT(INDEX(Group_OT_Details_Array.OT_Hours_Worked_Array,ROW()), 1.5))

Simple formula experiment:
SUM(INDEX(Group_OT_Details_Array.OT_Hours_Est_Array,ROW()),INDEX(Group_OT_Details_Array.OT_Hours_Worked_Array,ROW()))

Any ideas appreciated!

2 0

Replies

replied on October 23, 2018

I have an update on this. I was getting this error and it was keeping me from advancing to the next step. When I removed the read only property on my total field, the error stopped appearing. I removed the read only checkbox from the layout pane. I will have to add the read only property using javascript.

1 0
replied on February 11, 2019

I know it's an old thread but this is exactly the issue I am having. When I uncheck the read-only box, the form goes through. Did the Javascipt fix the issue for you?

1 0
replied on February 11, 2019
0 0
replied on January 3, 2020

The code in the above post made my read only field blank, this is the code that worked for me.  Note that #q4 needs to be the q number of your add button.  Credit for the code goes to my VAR, ECS.

$(document).ready(function(){
    $(".total input").attr("readonly", true);
$("#q4").click(function(){
    $(".total input").attr("readonly", true);
});
});

0 0
replied on March 30, 2018

Hi Susan,

I could not reproduce the issue you described. Which version of Forms did you use?

At which step did you see the error? Message start event or user task?

And when you "deleted a row", did you delete all the rows from the table?

0 0
replied on April 3, 2018

Hello,

We are on Forms 10.2. The error occurs in a user task and was displayed upon submission of a form after a row was deleted from a table where a calculation is used in one of the table fields (see above). In the example above, I deleted the third row, where Hours Worked is 0.00, by clicking on the X. Then I submitted the form and got the error. Thank you.

0 0
replied on April 3, 2018

Do you have any lookup rules or field rules on the form? We have known issue on 10.2.1 update 1 on [LFF1000-InvalidExpression] formula backend error when lookup uses current user/multiple read-only fields and formula uses hidden field.

If you don't have lookup rules or field rules, or if you have updated to 10.2.1 update 2, can you open a support case and provide us your business process for testing? Thanks.

0 0
replied on April 30, 2018

What is the relationship between performing calculations on a form and submitting the form? Submitting should only submit the data regardless of how the data was entered. IE: javascript, calculations, or user input. No more calculation logic should happen until another user has opened up the form through a user task.

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

Sign in to reply to this post.