Skip to main content
Solved

FSM: Use Expression in Validation Business Rule


Forum|alt.badge.img+5

Hi, 

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. 

View original

3 replies

Atheeq Maharoof
Superhero (Employee)
Forum|alt.badge.img+12

Hi @Jacqueline.Lyra 

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.

 

https://community.ifs.com/service-touch-apps-mwo-mro-43/increase-the-length-of-a-user-defined-field-6716


Hope this answer helps.

Best Regards,
Atheeq​​​​​​​


Saranga Amaraweera
Superhero
Forum|alt.badge.img+22

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. 


Saranga Amaraweera
Superhero
Forum|alt.badge.img+22

Adding more inputs, this can be done with a custom client script validation as well.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings