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

Question

Question

Laserfiche Designer set max limit on currency field in a table.

asked on January 30, 2024

Hello,

I have a client that would like to set limits on certain rows of their table in the modern designer.  

We would like to set a limit of $22 for the dinner row and set a limit of $16 for the lunch row. Does anyone have a solution to use for this? We have looked at setting the max value of the field in the table but that will affect every row in the specific column. Where we would like one row for the entire column. 

 

I was thinking a LFForm.changeFieldSettings would work if I knew the identification object to set max value. However, when looking I don't see that identification object available at this time.  - Javascript in the Forms Designer (laserfiche.com)

 

0 0

Replies

replied on January 30, 2024

Keisha, you are able to use field rules to validate column values, but it looks like you have to switch your rows and columns around to make that useful.

2 0
replied on February 1, 2024 Show version history

Rotating your table and columns would be a simpler solution given the nature of how field rules calculate per row. You wouldn't need to duplicate your field rules for each column and instead could have one for lunch and one for dinner.

If you still absolutely need your table formatted as shown, you could add a hidden field on your table to indicate which row you are on (would be the label of the row i.e., lunch). Then use a field rule like:

Validate Menu > Sunday as a value less than or equal to 16 when HiddenRowLabel equals lunch

  • This would then be duplicated for every column (you could see how this would be tedious to update in the future if your limits change)

And do the same thing for dinner. Barring extraordinary circumstances, you should go with option 1

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

Sign in to reply to this post.