Catalog reference variable

sravanip
Tera Contributor

Hi

We have a reference field B that will be visible based on previous field A. 

Reference filed B values will be pulled from table based on requested for(could be multiple records). 

If there are no values for the requested for user then table will be empty. In such case I need a alert message displayed in the catalog form that "user dont have service".

Looking for suggestions how to check the reference field is returning empty. Thank You

6 REPLIES 6

SAI VENKATESH
Tera Sage
Tera Sage

Hi @sravanip 

 

In this scenario you can use client script and script include. 

 

from script include you can return the result if result is empty then in client script  you can add alert message.

 

Thanks and Regards

Sai Venkatesh

Here onchange can’t be return on the reference variable since there are no values. 
the reference variable fetched data that has dynamic records in table. If there are no records for a particular user then alert has to be thrown

Manmaya Kumar S
Tera Expert

Is field A is requested for?
Anyways you can write a calalog ui policy and can set the condition on the reference field like <field> <is> <empty> or something.

Or if you are using a client script, then g_form.<variable_name> == '' 

If you meant it in any other way please do let me know.

Thanks! 

Reference variable fetches data from table which has dynamic record. If there are no records to display then alert has to Be thrown