How to get Multiple values from Edit Fields to validate users

ChristopherChilds October 4, 2024

Hello,

I am wondering if there was a way to validate information on an Edit Screen before Saving changes.

I have tree User Picker Fields. I want to validate that the same user does not exist more than once. The problem i I have is how to get the values from three different fields on the from the Edit UI.

I have seen references to the method getFieldChanged()
https://docs.adaptavist.com/sr4js/6.26.0/features/behaviours/api-quick-reference

Used as follows:

 

getFieldById(getFieldChanged())

 

But this is only mapped to the Field in a behaviour. It is not possible to use this to get the value of three different fields and then compare. 

Another way I have seen is which appeared to promise is getFormValue()

I tried to use as follows:

 

def developerField = getFieldById("customfield_0000000")
def developerUser = developerField.getFormValue() as String
but the value is null.

Does anyone have any suggestions?

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events