Based on checkbox field value, I need to set variables value true or false?

varma2
Mega Sage

Hi All,

We have software model published catalog items and all the software models stored in ''cmdb_software_product_model'' table.

In this table we have two check box 1 is pre installation 2nd is post installation. please refer the below screenshot of both fields,

find_real_file.png

 

We have catlog items in these models and we have a two variables same as pre installation and post installation.

If above fields is checked in software model  it will need to show below variable as a TRUE and if field not checked it will show false in below variables.

find_real_file.png

Please suggest me on this.

 

Thanks,

Varma 

1 ACCEPTED SOLUTION

@varma

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark my response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

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

View solution in original post

19 REPLIES 19

Hi Ankur,

Im trying with alert its showing NULL.

user is not giving build version while submitting the request it will fetch the value.

it is possible with out referencing any field value in that table cant we get that those checkbox values?

 

Please suggest.

Thanks,

Varma

Hi,

what user is giving in the string variable?

You should then use valid field name on that table to query to find the record

Similar to this

User gives user name in string variable and you are querying with user_name field on sys_user table

Regards
Ankur

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

Hi Ankur,

problem is we dont have a valid field on that table, field is there but that one prefix.

So i have tried below existing script include its fetching the value of pre and post.

Script include;-

find_real_file.png

 

Client script:-

find_real_file.png

 

 if both field in table checked, its set the value true in both variables. 

But the problem is if one field checked and second field is not checked, its set the both values false even one field is checked.

Please sugesst.

Thank you so much for your valuable time.

Glad to help.

If my response helped you please mark my response as correct and helpful to close the thread so that it benefits future readers

Regards
Ankur

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

Hi,

please check for both the values in the client script and accordingly set the values in variables

Regards
Ankur

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