How to have multiple condition builders on the same UI page?

spease
Tera Contributor

Creating a UI page and with one condition builder it works fine:

 

<g:ui_element table="u_custom_table" field="u_table" id="2959b3971b0ea1101933415dee4bcb0e"></g:ui_element>
<g:ui_element table="u_custom_table" field="u_conditions" id="2959b3971b0ea1101933415dee4bcb0e"></g:ui_element>
<script>
    document.getElementById("element.u_custom_table.u_table").hide()
</script>

 

Using the sys_id of the actual record we're wanting to modify for the g:ui_element's id means that we also get the conditions pre-filled, which is also great, and then I can just getFilter('u_custom-table.u_conditions') and get the encoded query.

 

The problem comes in with the fact that I want multiple condition builders on the UI page- indeed, that's the point of the UI page. They all point to the same tables and fields, but different records in the table. However, the ui_element macro seems to break in that case, presumably because the ID is based solely off the table.fieldname. Looking at the ui_element macro itself shows that all the heavy lifting is being done by a mysterious <g:element> jelly extension that seems to break if you feed it any extra or different parameters and for which I can find no documentation for.

 

Any ideas?