Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

List box Filter hierarchy

Hi i need have a list as below

task1.jpg

Here in need to create an list box as

tsk1.png

With in this if i click on bedding it shows an hierarchy for selection items below

tsk2.png

9 Replies
Not applicable

Please elaborate further as to what you require. What does your data look like, what do you want the end result to look like

Thanks,

Byron

settu_periasamy
Master III
Master III

May be try this in your List Box Properties..

General Tab-> Show as Treeview

                 -> With Separator as Comma

if you want the Grouped field, you can try this in your script Subfield(Type,',',1) as Grouped type

Capture.JPG

jagan
Luminary Alumni
Luminary Alumni

Hi Naresh,

Select Show as TreeView option in List box Properties with separator as , (Comma).  This will do.

Regards,

Jagan.

nareshthavidishetty
Creator III
Creator III
Author

Hi after apply the tree view it shows as below,

Untitled.png

But user not comfortable with this.Please check once in initial post

varshavig12
Specialist
Specialist

ARE YOU LOOKING FOR THIS:

marcus_sommer

Do you look for something like this:

subfield(cross_class, ',', 1) as MainGroup

subfield(cross_class, ',', 2) as SubGroup

this will be possible within the script or as listbox-expression.

- Marcus

varshavig12
Specialist
Specialist

If the above pic is as per your requirements

then you can use this or modify as needed.

abc:

HIERARCHY(GEOG_KEY, PARENT_KEY, GEOG_DESC, [GEOG PARENT NAME], GEOG_DESC, [HIERARCHY

GEOG], '|', 'HIERARCHY DEPTH')

LOAD * INLINE [

    GEOG_KEY, PARENT_KEY, GEOG_DESC

    TotalF, , SAMPLE

    Z1, TotalF, BEDDING

    Z2, TotalF, FURNITURE

    Z3, TotalF, HOME_OFFICE

    Z4, TotalF, HOME_ELECTRONICS  

];

RENAME FIELD GEOG_DESC1 to TOTAL;

RENAME FIELD GEOG_DESC2 to ZONE;

def:

HierarchyBelongsTo(GEOG_KEY, PARENT_KEY, GEOG_DESC,'ANCESTORS_KEY',

'ANCESTORS_NAME', 'Depth')

LOAD * INLINE [

    GEOG_KEY, PARENT_KEY, GEOG_DESC

    Z1, TotalF, BEDDING

    Z2, TotalF, FURNITURE

    Z3, TotalF, HOME_OFFICE

    Z4, TotalF, HOME_ELECTRONICS

  

];

REL_def:

LOAD ANCESTORS_KEY as GEOG_KEY

resident def;

   

RENAME FIELD GEOG_DESC1 to TOTAL1;

RENAME FIELD GEOG_DESC2 to ZONE1;

Not applicable

Hi Naresh,

See the below script and you will get the desired result.

LOAD if(Index(@1,',')=0, @1&'!', SubField(@1,',',1)&'!'&@1) as output

FROM

(txt, codepage is 1252, no labels, delimiter is '!', msq);

Here @1 is column name

And in the list box, Show as Tree View in that Add Seperator to '!' like below and you will get the desired result.

Thanks,

Sreeman

Not applicable

Hi Naresh,


Have you tried the above scenario? Please let me know

Thanks,

Sreeman