Databroadcasting not working when using SQL on foundset

Hi I am trying to filter data that is displayed in a table form.

I filter the foundset through a native SQL. I use native SQL because My where clause is quite complex that it has nested expressions, various SQL functions and has references to multiple tables.
When I execute the sql through a dataset and apply it to the foundset, the databroadcasting does not work as expected. Adding new records in another client instance does not update the foundset records displayed in the Table form even if it satisfies the SQL filter.

How do I perform complex filter on a foundset without affecting the databroadcasting of Servoy? Is there a workaround for this?

Well, it sounds like you are getting a dataset, and then loading the dataset into the foundset. Basically that means your just telling the foundset to load a set of PK’s. So obviously new records won’t pop/broadcast into that foundset.
Try using a foundset filter instead. (pseudo code)

foundset.addFoundSetFilterParam("primary_key", "IN", "SELECT primary_key from my complex sql...")

You might still have the same problem, but its worth a try.

Hi Thanks for the reply! Yup, I understand that it would make it a dataset and this would affect the data broadcasting.

I really need a filtering that is very similar to native SQL statement, which has nested expressions, but would not affect the data broadcasting.

if new records need to popup into it
you need a related foundset maybe filtered even more by some search/find states, else it won’t work