ref_ac_columns within ui pages

Dan R
Kilo Expert

Is it possible to add a ref_ac_columns and ref_ac_columns_search to a UI page? Right now I have a UI page that is referencing the sys_user table, and we want to be able to search by first name, last name, email, and username. Currently searching by first name or last name already works, so I went into the sys_user table and updated the attributes for the "name" field to include email and user_name but this didn't work.

 

I saw an article here where Chuck T provides a screenshot of available field attributes to use in a ui page, however I don't see this ui page (called ui_reference) in neither my company instance, or a personal dev instance. I also don't see this attribute listed on Chuck's screenshot, leading me to believe this may not be possible. 😕

 

For clarification, IS it possible to use the ref_ac_columns attributes in a ui page to allow different search values for the 1 field that exists in the ui page? 

3 REPLIES 3

Coleton
Kilo Guru

I would start with the following:

<g:ui_reference name="user" completer="AJAXTableCompleter" id="user_name" table="sys_user"/>

From there, you can add the columns attribute to the UI reference by doing the following:

<g:ui_reference name="user" completer="AJAXTableCompleter" id="user_name" table="sys_user" columns="user_name;manager;phone;location"/>

Just add the 'columns=""' attribute and the list is delimited by semicolons. Let me know if I have answered your question by marking this as correct. Thanks.

Coleton,

 

Thanks for the tips here, however I don't see this working as I need. After adding your code I still need to search by the "name" field for any values to come up. With the script you provided, the drop-down now shows Name, Username, and Email address, which I can see being useful. My issue is I want to also be able to search by email or username, not just the first or last name of the name first. 

 

How can I tell the field in the UI page to ALSO parse user_name and email when I start typing in the search box?

 

 

Thanks again

Hi Dan, 

Running in the exact same thing, have you ever figured out how to fix this? 

 

Kr,

Robin

If my answer has helped with your question, please mark it as correct and helpful.

Kr!
Robin