Home > Forum > General > Comment required depending on a Business rule

Comment required depending on a Business rule
0

Hello,
I would like to set a comment as required depending on a value of a data table. Is it possible to make this requirement dependent on a business rule? If so, how would I proceed here?
Thank you very much!

Hi,

I am not sure if it's possible using the regular comment section.
However, you can emulate its behavior using a multi-line text field.

Just enable the append mode in the field configuration.
By then adding a business rule to the requiredness restriction of the field you'll be able to toggle it.

In the example from my screenshot, I just check if any rows in the example table have the value true for a specific column, based on that rule the text field becomes mandatory.

MVP

Hi,

there's also an alternative using the "Additional path validation form rule".

In my example I created field which defines, whether a comment is necessary or not.
If this is true another form rule is executed. This form rule returns true or false depending on the value in the comment field. This form rule is of type JavaScript:
return document.querySelector("textarea[aria-label='Comments'").value ==''

If this returns false, an alert is displayed.

Remarks:
a) This solution will only work, if the comment is visible.
b) The part "textarea[aria-label='Comments'" may be different in your version. I'm using WEBCON BPS 2025
c) The false and true in the "Additional path validation form rule" will prevent or allow the path transition.

In your case you don't have the "Comment required" field but you could create one and set it to "technical" field. During the page load you could execute a form rule which sets the value of this field using a business rule.

Best regards,
Daniel

Did you know that with WEBCON you can automate virtually any process? Even baking cookies 🍪
 
Speaking of cookies: we use the ones that are essential for our website to function properly, as well as additional ones that help us customize our content to your preferences. If you don’t mind cookies, click Accept. If you want to learn more, explore settings.
Settings