Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select Field :Select child name and get all the children belong to that parent

In Select Field , I want to select one child Name  C1 and in table box I would like to see all the children for the C1's parent.

For example,

Query in qlikview

Children     Parent  ChildAge

C1               p1      8

C2                p1     10

C3               p2       12

C4                p1      5

C5                p2      4

Now , using select field , if I select C1 , I would like to see below result set in Tablebox or in other object control.

Children      parent     ChildAge

C1               p1                    8

C2               p1                    10

C4               p1                    5

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Ah yes, another moving target....

Maybe like attached?

You'll need to first select a child in children listbox, then press the button, the table box is populated with children of same parent. It's an input field, you can modify the child (Not sure if this makes sense, but you will know).

Regards,

Stefan

View solution in original post

6 Replies
swuehl
MVP
MVP

Hi programmer123,

maybe like attached?

I just used a straight table with dimensions children and parent and this as expression:

=sum({<Children=p({1<Parent=p(Parent) >}) >} ChildAge)

Regards,

Stefan

Not applicable
Author

Hi Swuehl,

your answer is helpful, but my exact requirement is

1) In Select fields ,I will display the list of : Children, and from the list I will  select one children element

Now , i should be able to capture the parent of the selected child and then would be able to find all the children for that parent

2) In table box , I  would be able to see the children list of the parent.(i would like to see this in table box, not in staright table)

so for example,

In select field , if i select children  C1,  table box should display the data like below.

Children parent ChildAge

C1          p1          8

C2          p1          10

C4          p1          5

3) Once the data displayed in table box, i will use input field on children field in table box and then i will modify the input field value and those changes should be reflected on Chart.Chart should display data based on TableBox

I hope you understand!!!!

swuehl
MVP
MVP

Ah yes, another moving target....

Maybe like attached?

You'll need to first select a child in children listbox, then press the button, the table box is populated with children of same parent. It's an input field, you can modify the child (Not sure if this makes sense, but you will know).

Regards,

Stefan

Not applicable
Author

Hi Swuehl,

thx fro help!!  i dont have Licence version, can you pls send me the steps !!! sorry for giving extra unncessary trouble

swuehl
MVP
MVP

Hi,

I am on road so just trying to remember:

Create a button with action Select - type Select in fields.

Field is plain

Children

Search expression is

='=sum (...)'

where you use the sum as given above.

Use an inputfield statement in the script.

Regards,

Stefan

Not applicable
Author

HI  Swuehl,

Thanks for reply!!! your answer works...