Hide Parents Row without Children rows

Hi Team:

I have a parent and a children table. The children table may be filtred for any condition of one of its fields.

When the filter is active, some rows on parent table have not a row into a child table. I want hide the rows in function on it. Thats to say, not shows the parents table rows that not have a child..

I understand that I must put a funcitin into row filter on slice, but I can not found how it must be.

Can you orient to me ???

Thanks in advance

1 Like

In your parent table, there usually is a system generated col called [Related Childs]

Could you try COUNT([Related Childs]) > 0 in your slice filter?

1 Like

Thank you TeeSee !!!

The “Row filter Condition” into slice, only works when I put a Childs quantity is not 0.

COUNT([Related Childs]) > 1 works fine. The slice shows the Parent rows that have 2 o more rows into childs table. If I use COUNT([Related Childs]) = 1 this woks fine too.

But when I use COUNT([Related Childs]) > 0 the slice still shows the parents rows when it has not a childs rows.

I am looking for which can be the cause or what I must add to condition to it works fine, but I can not find it still .

Thanks a lot again !

Omar

My test table/Slice works fine with COUNT([related records]) > 0…

However Try

ISNOTBLANK([Related Childs])

or

COUNT([Related Childs]) >= 1

1 Like

I tried these two options you tell too, but they not work for me . I can not understand why.

My “problem” is only with the zero childs rows. I will continue trying and tell you when I get the solution for my case.

If you have other idea it will be fine too :thinking:

Omar

Actually had one more expression to try

OR(COUNT([Related Childs]) > 1,COUNT([Related Childs]) = 1)

since either one works on its own…

I’m sorry TeeSee. You were always be right.

The issue was a bad concept from me…Sorry again !.

The problem is that I need filter the childs rows to show two different views: One view will shows ussing Childs[filter]=“A” , and other with Childs[Filter]=“B” . In some cases the filter make that some Parents rows haven’t rows childs.

I have made the filters on Childs table ussing two slice. One slice for Filter=“A” and other for Filter=“B”. But it is not correct !!!

To see the problem, I have added into Parent table a virtual field Parent[RelaCount] with the formula COUNT[Related chids]. And it always shows ALL the childs rows independently of the slice that I show… :person_fencing:

OF COURSE !!

For a related table I must make the filter into the table. Not ussing a slice.

Then, into Chids table I have added a [Filter]=“A” into Secutity Filter section..and It works right !!!

Now I need to find how change “dinamically” the Security Filter sentence in function an option selected into a menu…but it is other history.

I am trying resolve this righ now.

I want to upload the solution to this after I found for if it can be usefull for any

Thanks a lot !!

Omar

Hi TeeSee 1

I have found the solution to my issue.

I advance: As you can see, my AppSheet level is high ( high beginner :rofl: ) .

The solution is that the VC Related Chids into Parent table must be reference to Slice (not to Childs Table) which I use to filter the Childs table. I named this slice sl_Childs.

Then the VC Relaled Childs → formula

REF_ROWS(“Chids”, "<<Field to related on Childs Table>> ")

Must be chagned to

REF_ROWS(“sl_Chids”, "<<Field related on sl_Childs Slice >> ")

Add tho this, the Field Related in sl_Childs must be added to Slice Columns if you are not showing all table columns into Slice.

I want to this post be usefull for any

Many thanks a lot agait to all

Omar

2 Likes