Issue with Variable attributes

Subhajit Mukhe1
Kilo Expert

I have a variable ina a catalog item that references the user table. I need the following functionalities in that variable:

1. Along with first name. the variable should also allow searching a user by the last name - I have used the following attribute for this "ref_ac_columns=first_name;last_name,ref_ac_columns_search=true"

2. I also need to display the email of the user beside the full name - I have used the following attribute for this "ref_auto_completer=AJAXTableCompleter,ref_ac_columns=email,ref_ac_columns_search=true,ref_ac_display_value=false"

 

I am able to achieve these 2 functionalities separately but if I try to merge these 2 attributes with a comma, both of them doesn't work simultaneously. Can anyone guide me on this?

 

Thanks in advance.

1 ACCEPTED SOLUTION

I would say, in general, that your two goals are mutually exclusive. Any column you can search on will be added to the displayed results while searching. The only thing I can think of would require a somewhat drastic change, with potential performance implications. 

Leave email as your ref_ac_column= entry and then...enable "contains" for all reference field searches. Documented here

By default, all auto complete searches are "starts with". This property allows you to change that behavior to "contains" by default (which, by the way, you can do individually by adding * to what you are looking for). Since First / Last are part of the display value, setting this property would allow you to find people by first or last name, and adding rmail as your ac_ref will make it also searchable and part of the display. 

Kind of overkill for an isolated requirements but...it's the only way I could see it working. 

Hope this helps!

If this was helpful or correct, please be kind and click appropriately!

Michael Jones - Proud member of the CloudPires Team!

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

View solution in original post

4 REPLIES 4

Michael Jones -
Giga Sage

So, maybe I'm not totally understanding what your issue is, but I entered something like this: 

ref_ac_columns_search=true,ref_ac_columns=email;first_name;last_name,ref_ac_display_value=false,ref_auto_completer=AJAXTableCompleter

And see this: 

find_real_file.png

Is your issue that you can see the first name and last name off to the right as well as the e-mail address? Unfortunately that is the behavior when you add ref_ac_columns.

Hope this helps. 

If this was helpful or correct, please be kind and click appropriately!

Michael Jones - Proud member of the CloudPires Team!

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

Actually, the thing is initially I had a requirement to only allow last name search like below:

I had achieved this using "ref_ac_columns=first_name;last_name,ref_ac_columns_search=true"

find_real_file.png

 

But now I need to display only the email id of the user beside the full name along with the previous last name search functionality.

So if I try using "ref_auto_completer=AJAXTableCompleter,ref_ac_columns=last_name;email,ref_ac_columns_search=true,ref_ac_display_value=false" then last name also comes up as a column whereas I only needed it as a search criteria.

 

find_real_file.png

 

I only need full name and email id to be displayed. Last name should remain a search criterion. This is where I am stuck.

I would say, in general, that your two goals are mutually exclusive. Any column you can search on will be added to the displayed results while searching. The only thing I can think of would require a somewhat drastic change, with potential performance implications. 

Leave email as your ref_ac_column= entry and then...enable "contains" for all reference field searches. Documented here

By default, all auto complete searches are "starts with". This property allows you to change that behavior to "contains" by default (which, by the way, you can do individually by adding * to what you are looking for). Since First / Last are part of the display value, setting this property would allow you to find people by first or last name, and adding rmail as your ac_ref will make it also searchable and part of the display. 

Kind of overkill for an isolated requirements but...it's the only way I could see it working. 

Hope this helps!

If this was helpful or correct, please be kind and click appropriately!

Michael Jones - Proud member of the CloudPires Team!

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

Allen Andreas
Administrator
Administrator

Hi Subhajit,

Those two lines do not need to operate separately.

As mentioned above, you just simply need to add additional parameters to the columns already there.

So first_name;last_name;email...altogether.

Please mark reply as Helpful, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!