cancel
Showing results for 
Search instead for 
Did you mean: 

How to conditionally require a field to have data entered based on document life cycle state?

karl_harris_
Star Collaborator
Star Collaborator

I want to require a field to be filled in the edit mode but only if and when a specific life cycle state is the current state.

If I check the required button the field is required even if it is not displayed in edit mode. I already have conditional statement DISPLAYING the fields in edit mode based on life cycle state by using (#{layoutValue.currentLifeCycleState=='XState' ? 'edit':'hidden'}).

I would like to implement the following logic: Require and display an arbitrary field if the document is in life cycle state X.

Can this be done with studio?

Do I need a custom widget/layout?

Validation?

1 ACCEPTED ANSWER

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Making a widget required based on the same criterion is easy: the property named "required" can accept an EL expression as value, such as "#{layoutValue.currentLifeCycleState=='XState'}.

Just fill a "custom property" with name "required" and it'll override the value held by the checkbox.

View answer in original post

1 REPLY 1

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Making a widget required based on the same criterion is easy: the property named "required" can accept an EL expression as value, such as "#{layoutValue.currentLifeCycleState=='XState'}.

Just fill a "custom property" with name "required" and it'll override the value held by the checkbox.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.