Category: How do I do X?
Updated

2023-08-03

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Data validation with currentRow

Issue

I am trying to set validation for an editable column in a table, based on the non-editable column in the same row. However, the "currentRow" variable is not accessible in the validation fields like "Max", "Min", or "RegEx". It only works in the "valid" field, which is non-intuitive. I would like to file a feature request/bug to address this issue and improve the usability of the product.

Resolution

The user is trying to set validation for an editable column in a table to be the maximum of the non-editable column. They attempted to use the currentRow variable in the validation, but found that it was only accessible in the "valid" field and not in the "max" or other fields. They were able to use the following code in the "valid" field to achieve their desired validation: {{editedValue <= currentRow.qtyRemaining && editedValue >= 0}}.

The user was informed that the currentRow variable should be accessible in the "max" field and asked to confirm if this was the case. However, the user confirmed that it was not accessible and was advised to file a feature request or bug report with GitHub to include the currentRow variable in the "max" field.

To summarize, the user was able to use the "valid" field to set their desired validation and is considering filing a feature request or bug report to include the currentRow variable in the "max" field for future use.