15
Views
3
Comments
A validation on a button to check if certain input is existing in certain aggregate

Hi OS community!

I'm quite new to the OS Platform, and I wanted to ask for help. 

Is there a way to have validation on a button regarding an input (text) to an input field? For example, if there was a promo and I had a promo code, the button will validate whether that promo code (text) exists. If it does, the inputted promo code will be transferred to a corresponding aggregate with all other input field details. Meanwhile, if it is not existent, there will be an error. The user cannot proceed until they present an existing promo code.

Best,

Rafa 

Rank: #683

Hi Rafeal,

You can add a filter in aggregate to check that entered promo code is exist in your entity or not 

like {Enity}.[PromoCode]=EnteredPromocode 

If the entity gives you the record that means the promo code exists and if the {Entity}.List.Empty is true that means promo code does not exist

Hope that will help you

Regards,

Krushna

mvp_badge
MVP
Rank: #128

Rafael Guevara wrote:

Hi OS community!

I'm quite new to the OS Platform, and I wanted to ask for help. 

Is there a way to have validation on a button regarding an input (text) to an input field? For example, if there was a promo and I had a promo code, the button will validate whether that promo code (text) exists. If it does, the inputted promo code will be transferred to a corresponding aggregate with all other input field details. Meanwhile, if it is not existent, there will be an error. The user cannot proceed until they present an existing promo code.

Best,

Rafa 

 

 Hi Rafael,


Please have a look attached lesson PDF given by OutSystems.


Thanks.


14.InputValidation.pdf

mvp_badge
MVP
Rank: #19

Hi Rafeal,

The training material that Jitendra Yadav provided is relevant if you are developing a traditional web application.

If you are building a reactive web application have a look the the training material in the following training:

However, as you are new to OutSystems, I would suggest not to find the training material everytime you run into a situation where you don't know how to solve it.

www.outsystems.com/learn is a great site with FREE learning material, and I strongly advice (every newcomer to the OutSystems platform) to start with one of the guided paths to learn the basics. The training material will get you up to speed very quick in understanding how to develop applications with OutSystems.

Regards,

Daniel