Checking application value Choices and make Choice Mandatory

Manohararuna
Tera Contributor

Hello Everyone,

 

      I have one requirement in Catalog form

The catalog form having the Application(reference field typre) field and having the value application name like Jira,Moto,HP,Delta

and having the Choice 1,Choice2 Choice3 fields (these fields are select box type.)

Jira field having the Choice 1 values onnly

Moto application having the Choice1 , Choice2 values

HP Application having the Choice1,Choice2,Choice3 value

Delta application not having the Choice value.

Suppose if i select Jira as application it check is it having the Coice value make the mandatory the choice1 field in catalog form.

same way if select application as Moto then it check teh Choice1,Choice2 value if it having making mandatory Choice 1,Choie2 in catalog form

if not having mandatory notrequird

Please provide solution to this reuirement

 

Regards,

Manohararuna

5 REPLIES 5

Mark Manders
Mega Patron

What did you already try? It sounds like a catalog client script could bring you the solution.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

no mark, actually i am trying to write the catalog client script but application and choice fields are not there in Variable. Those are in Catalog form. 

Ankur Bawiskar
Tera Patron
Tera Patron

@Manohararuna 

share screenshot of what script you tried.

From your question it looks like an easy task

Write onChange catalog client script on Application variable and then based on record sysId add the options to the select box using g_form.addOption()

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hello Ankur,

        Below one is Employee Service Center catalog image . As you said in onChange catalog client script possible but, in variable set Application variable is not there ,How get that one. i want to make choice 1 field based selected option in Application .if the application value having teh choice 1 then Choice1 converted to mandatory.notification at the time of order catalog item

Manohararuna_0-1756200347231.png