Tree picker - same values in several hierarchies

tkrishna29
Giga Guru

Hi,

I have a tree picker configured. It has same values in different hierarchies.

For ex - Mobile is in GRP A and GRP B. Both have a different item code though.

When I type in Mobile on tree picker field, it shows both Mobiles, but user would not know which one to select unless he opens the hierarchy, and choose it from that particular group. Is there a workaround for this?

If users are selecting multiple items, generally they dont want to go search through hierarchy everytime if they know the item. This works fine if there is only 1 item with that name. 

 

Thanks,

Krishna

 

1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron

Hi Krishna, can you try dropping the quotation marks from the attributes string IE
tree_picker=true,ref_auto_completer=AJAXTableCompleter,ref_ac_columns_search=true,ref_ac_columns=uuid
Regards Tony

View solution in original post

6 REPLIES 6

Tony Chatfield1
Kilo Patron

Hi,

you can make other fields visible when typing into the reference field with these attributes
ref_auto_completer=AJAXTableCompleter,ref_ac_columns_search=true,ref_ac_columns=’some other field(s) on the table’

But if you have more than 2 levels of data you will may find that you need to look at concatenating the record and parent values into 1 string field (with a clear delimiter) and adding that string field to the attributes

IE
concatenated string = 'Top parent > level 2 parent > level 3 parent > The record being selected'.

attributesref_auto_completer=AJAXTableCompleter,ref_ac_columns_search=true,ref_ac_columns='concatenated string'

 

So when you typed 'The' into your reference field you would see every unique record that matches The followed by the related attribute data (concatenated string)

The record being selected             'Top parent > level 2 parent > level 3 parent > The record being selected'
The other record                          'Top parent > level 2 parent > The other record'
The parent                                   'The parent > and > it's > children A'
                                                   'The parent > and > it's > children B'

This will require some additional code as you probably want to script the building of the concatenated string
and also need to ensure that all records are updated if something changes anywhere in the parent chain.
(the update on change part is still on my list of things to do).

Regards Tony

 

 

tkrishna29
Giga Guru

Hi Tony,

Thanks again for the response.

I tried that.

find_real_file.png

find_real_file.png

It is still showing single value.

Tony Chatfield1
Kilo Patron

HI, if your data is a customization? then I would expect the field name to have a u_prefix, perhaps you could you provide an xml of the 2 data records you have referenced here as choices, and also xml for the reference field used for selection - 'Pick a Tool' Regards Tony

tkrishna29
Giga Guru

Hi Tony,

After you mentioned, I checked the reference and changed accordingly. Still no luck!

tree_picker=true,ref_auto_completer=AJAXTableCompleter,ref_ac_columns_search=true,ref_ac_columns='uuid'

Attached data and reference field used.

find_real_file.png