I am trying to conditionally display a view on a SmartForm. The view is connected to a List event of a SmartObject from a SQL database.
I start off with the view set to not visible and then in the form initalization event I want to check if the view has values and then display it if it does.
I tried adding a Count aggregation to the list view and then testing for the value not being = 0. If it is true, then I Show the view. The aggregation comes back correctly but the Condition doesn't evaluate. If I 'Show a message' to the user with the value of the aggregation before doing the test, then it works. If I take the 'Show message' out then it stops working again. I tried putting the condition in the 'Initialized' method instead of Initializing, but that didn't help either.
Can anyone tell me the best way to achieve the desired behaviour please?
Thanks