squaladesign
Forms Fledgling

Show a view only when it has data to show

Jump to solution

Hi everyone,

I created a Smart Form with a Main View that when is filtered or someone click an item it will filter all other views. My question is, can I show the views ONLY when there is some data in it?

I didn't see how do that.

Thanks 

Labels: (1)
0 Kudos
Reply
2 Replies
Prineel_V2
Forms Fledgling

Re: Show a view only when it has data to show

Jump to solution

Hi, 

 

Im assuming that you are using listviews:
1. On your form design, uncheck the "Visible" option of the view. That will automatically make the view invisible when the form loads:

Prineel_V2_0-1623996652873.png

2. In your rules, on the "When the form is initializing " rule, add a for loop and select "all" and your listview:

Prineel_V2_1-1623996851014.png

3. Add an advance condition and filter by the smarobject that your listview is using, you can filter by any property that has data, i just use "ID" because it always has data as it is a primary key:

Prineel_V2_2-1623997019378.png

4. Finally, use the "Set a view's properties" action and make the view visible:

Prineel_V2_3-1623997108175.png

 Logic: The system is going to loop through all the items in the smartobject and if it cant find any, then its not going to display the view.

 

Kind Regards

Prineel

View solution in original post

Reply
squaladesign
Forms Fledgling

Re: Show a view only when it has data to show

Jump to solution

Thank you, I was doing a similar solution by using the count. I didn't know about "When the form is initializing " rule.

Great I will test 

0 Kudos
Reply