scripts to check single line text against table

TMKAM
Tera Contributor

I have created Single line text in service catalog, and I have table 'trusted domain whitelisting".

Details as per below

 

Single line Text variable (u_domain_name)

table name = u_trusted_domain_whitelisting

Table Column 1 = u_active (True/False)

Table Column 2 = u_domain_whitelisting 

 

Here is scenario.

 

Scenario 1

When user enter a name in u_domain_name (variable), need to validate the domain name is existed or not in table "u_trusted_domain_whitelisting" and check if Table Column 1 = u_active (True) and it should check Table Column 2 = u_domain_whitelisting is existed if yes it need to show up an error message "Domain is available" and when user press "OK" it need to clear the u_domain_name (variable).

 

Scenario 2

When user enter a name in u_domain_name (variable), need to validate the domain name is existed or not in table "u_trusted_domain_whitelisting" and check if Table Column 1 = u_active (False) and it should skip check Table Column 2 = u_domain_whitelisting and nothing happen.

 

Please help me any one idea about this?