Check query output

Check query output


I have a screen designed to insert or update an asset. When i have completed inserting or updating I want to return to the customer screen of the current customer. This only happens when I insert, because then I have a companyid with which I retrive the company record in a query. Ik want to check if the output of the query is empty. If so I want to launch another query to retrive the companyrecord with the assetid. How can I perform the check? Please help!

Hi John-Pierre,

The short answer to your question is to use the List.Empty property to check. As an example, if your QUERY node's called GetCompany, you could check GetCompany.List.Empty in an IF node afterwards.

The longer answer :) is that, I would suggest you create a simple <Entity>_Edit screen using Intelliwarp and look at what Service Studio generates insofar as the Preparation and Save actions are for that screen. This will show you that you can always use CreateOrUpdate and use the output of that action as the Id of the created (or updated) entity and feed that back into the same screen to be left looking at the new (or updated) record.