I want to add a validation that triggers when a specific text line code is added, the text shouldn’t be longer than 240 characters.
Unfortunately I am getting above error message. Any Idea how the syntax needs to be?
Many thanks in advance!
Best regards
Jacqui
Best answer by Saranga Amaraweera
Hi @Jacqueline.Lyra ,
LEN() is not a valid expression function in FSM even though it’s in SQL. You can simply create a custom view for this to check whether the task_text.text length is less than or greater than the given character length with SQL LEN function (having a boolean result column in the same view). Then create custom metadata for the same view and join that view on the task_text table with a new join relationship so that you can easily have the view’s result column as a BR rule input. Finally, you can call the validation directly from that.
As per my understanding you cannot use LEN() function in the business rule. In the BusinessRules document following are the functions which can be used in the business rules.
Supported Function
If you want to restrict the number of character you have to change the metadata. Following is a thread which says the steps to configure the metadata.
LEN() is not a valid expression function in FSM even though it’s in SQL. You can simply create a custom view for this to check whether the task_text.text length is less than or greater than the given character length with SQL LEN function (having a boolean result column in the same view). Then create custom metadata for the same view and join that view on the task_text table with a new join relationship so that you can easily have the view’s result column as a BR rule input. Finally, you can call the validation directly from that.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.