cmn_deparment table issue on Workflow

An6
Tera Contributor

Hi,
Does anyone know why I can't find the Departments table (cmn_department) in the workflow conditions?

I can add each separately via a variable but I would like to create a condition: Departments contains 'Transformation&Technology' and it is not possible to refer to the table in this way.

An6_0-1740569230374.png

 

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@An6 

you will have to use only that syntax which you shared

You cannot directly see that variable in conditions

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

but if it is the cmn_departments table then why can't I access it?
the cmn_locations table can be accessed normally, even without entering variables.

An6_0-1740569831802.png

 

Hi @An6 

 

Check is it restricted some time in system properties. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

@An6 

I assume workflow is for your catalog item and is running on RITM table

that's because Location is a field on RITM table but variables are not directly stored at RITM level

So the only way to access the variables is the syntax which you are already using.

you can use script if required for more complex check

answer = ifScript();

function ifScript(){
	var departmentValue = current.variables.departmentVariable.getDisplayValue();
	// now use this to compare and return 'yes' or 'no'
}

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