10
Views
6
Comments
Solved
Check if aggregate returns data
Question
Application Type
Reactive
Service Studio Version
11.54.32 (Build 62934)

If an aggregate has no records, I want to hide a container. I have tried various scenarios, none of which worked. Most of them have an error inside the If condition:


I finally got it to accept this "GetTradeReferences.Count=0" and "GetTradeReferences.List.Current.CustomerTradeReferences.Id=NullIdentifier()" but neither option hid the container. When I run the aggregate with a test value it doesn't return any records so I know there's nothing in it.

Champion
Solution

Hello

Why don't you use Empty property of a List to, Hide and show,

If there is no record Empty property will be true

and if there is data it will be false

Adding a Sample for you for the same

I hope this helps you

Thanks
Tousif Khan

TestAppForm_Sample.oml

I didn't have an empty property so I tried the .IsDataFetched however it hid it whether there is data or not. Is there a way to add the Empty property? Newbie here.



Champion

It has you just need to expand a list under list you will find it.

It seems like .Count should work.



Champion

Also if possible can you share the oml, maybe I can help you by seeing what actually you are doing there.

but the simplest way you can use empty property, See the attached sample.

Thanks
Tousif Khan

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.