Condition Builder

User166992
Tera Guru

Hi,

Is anyone used Condition Builder in UI Pages?If yes, Please share jelly code of the same

21 REPLIES 21

JonathanJacob
Mega Sage

Jaikumar,

I think this might help:


1. Create the condition/table field as you normally would on the table of your choice.
2. Write down the sys_id of the Dictionary record of those items.
3. create your UI page.
4. use the following jelly tags:



<g:ui_element table="[table_name]" field="[table_reference_field]" id="[sys_id_in_dictionary]"></g:ui_element>
<g:ui_element table="[table_name]" field="[condition_field[" id="[sys_id_in_dictionary]"></g:ui_element>


5. replace the items within the [ ] tags.
6. Try your UI page.


How do we get encoded query on client side in custom ui page? Please advise


Do you need it via script?


http://wiki.servicenow.com/index.php?title=Client_Side_GlideRecord#getEncodedQuery.28.29



or via clicking? => simply right click the created filter and select "Copy query"


@eican below link is not available, could you please share updated link ?? 

http://wiki.servicenow.com/index.php?title=Client_Side_GlideRecord#getEncodedQuery.28.29