How to get data from database table to a text box according to if condition?
Application Type
Service Studio Version
11.11.0 (Build 42742)
Platform Version
11.9.1 (Build 20359)

Hi all!

I have an app which is going to be accessed by multiple users. One of them is an admin and she has access to particular screens which others do not and a separate logic flow has been created for her.
She logs into the app and she goes through 2 other screens until she reaches the final one where she needs to type some information as show in the form below.

All this information she enters is according to a specific process order number which comes from SAP so when she clicks on submit as shown above, all this information gets stored in a database table.
Now, I need to use the data stored in that table according to a process order number which is the key identifier and use that in another screen where the app should fetch data from the database if "process order number" matches the process order number in the database.

So basically, if in my other screen the process order number coming from SAP is 1234567, then the app should check if there is information for this process order number stored in my database table, and if found then get all of the data into the fields in this screen from the database table.

I can't figure out how to fetch the data from the database table according to an if condition that dynamically checks for process order numbers, if data for each of those is found in the database, extract the info into this screen, if data not found, then display no value found.

Please let me know if this makes sense. Thanks so much for the help!


Hello ZK,

You could achieve this as follows:

1. Create an aggregate for the Entity with the 'Process Order Number' and filter it based on the 'Process Order Number'.
2. Set the aggregate's 'Fetch' property to 'Only on demand'.
3. Create a new Action for the Aggregate's On After Fetch event that would populate the fields in a screen. 'On After Fetch' ensures that the data is populated only after all the data has been fetched from the database.
4. Call the Action from #3 in the Submit logic and pass the 'Process Order Number' to the Action.

Hope this helps,


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