checking if data that has been filled in is in the databse
Service Studio Version
11.14.0 (Build 54183)

I want to check if the data that has been filled in is already in the database, if it is you can go to a new page and if it isn't you stay on the same page


Hello Stefan.

You can look at the usual validation logic here.

Your condition in this situation will be "does the data on screen exists on database?" you just need to do a query to check the database.


Just to add some visuals to Nuno's great answer.
On your button click you'll want something like this to be triggered (simplified version). (this is for traditional web, for mobile and reactive it will look slightly different but the concept remains the same)
You use the input value in the aggregate to see if it exists followed by an If statement that acts accordingly

I figured out how to check the authentication code and it works, but unfortunately only for 1 authentication code, this means that if I log in with someone else's account the code stays the same. any idea how I can fix this? in action 2 the information is being retrieved


I am uncertain what is happening in Action2?
In Action2 you should pass the authentication code from the input parameter. Verify it with the database using an aggregate. Then have an output boolean that says if the code was found or not (if aggregate empty then the code was not found)

Then in your second if statement you just use that output boolean.


That is a more specific problem.

If I understood correctly, the code is the same for eeveryone? The authentication code should be unique (or at least random) for any specific user.

You can create a new entity to stores the code of each user (and time of creation so you can invalidate them after x minutes).

I have a different code for all user's as seen here

 but I don't know how I can implement this in OutSystems.


Hi Stefan,

As stated in my answer above, what you want is to filter your AgentID entity using Authenticationcode ( and if needed the username)
Then if the result is empty you know that the id isn't used yet.
If it isn't empty you know it has been used.

Then you can reference this in your if statement later

Hi  Stefan Pouls

Please find attached an OML with a simple implementation.

Hope it helps.

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