1289
Views
8
Comments
Solved
How can i verify if element exist in database.
Question

Hi,


I have a page like this:

when i click button, it navigate to this page:

so, i'm trying to validate if the number wrote in the first page exist before enter to the second page and show message (please enter correct number),


Sorry but i don't speak very well english, :)


Thanks.

2021-04-08 11-10-22
EFreitas
Solution

You can follow the document that I sent.

You only need to do a query to verify if the number is in Database. If not you show the error message, if yes you go to the second screen.

2018-06-15 00-21-10
Pedro Vila Nova

Hi Alexis, 

so: 

  1. add an input parameter at destination page.
  2. at destination page use the input parameter to compare if exists
  3. if doesn't exist use feedback message, for example;


Test and give me your feedback.


Best Regards,

Pedro Vila Nova

      



2021-04-08 11-10-22
EFreitas

Hi Alexis,

Instead of navigate to the page, call a server action and follow this:

https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Forms/Validate_Form_Inputs

You only enter in the new page if the number is valid.

or see this one: https://www.outsystems.com/learn/lesson/857/input-validation/


kind regards,

Emanuel

2018-06-15 00-21-10
Pedro Vila Nova

EFreitas wrote:

Hi Alexis,

Instead of navigate to the page, call a server action and follow this:

https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Forms/Validate_Form_Inputs

You only enter in the new page if the number is valid.

or see this one: https://www.outsystems.com/learn/lesson/857/input-validation/


kind regards,

Emanuel

Hi EFreitas, by what Alexis said, the objective is enter at other page... even if not exists, like a new ID I guess


2022-09-29 23-59-46
Alexis Rodriguez

Pedro Vila Nova wrote:

EFreitas wrote:

Hi Alexis,

Instead of navigate to the page, call a server action and follow this:

https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Forms/Validate_Form_Inputs

You only enter in the new page if the number is valid.

or see this one: https://www.outsystems.com/learn/lesson/857/input-validation/


kind regards,

Emanuel

Hi EFreitas, by what Alexis said, the objective is enter at other page... even if not exists, like a new ID I guess


Hi,

i want enter to the second page only if the number exits in database, because in the second page i going to update the data of the number enter in the first page.

bless.


2021-04-08 11-10-22
EFreitas
Solution

You can follow the document that I sent.

You only need to do a query to verify if the number is in Database. If not you show the error message, if yes you go to the second screen.

2018-06-15 00-21-10
Pedro Vila Nova

Alexis, ok, didn't understand the objective...

So like @EFreitas said, instead of use and button with method navigate, use ScreenAction, with the validation i was telling before, if exists then you use : 

otherwise set the inputMessage or FeedbackMessage.


But don´t forget to add the input parameter at the navigation page.

2022-09-29 23-59-46
Alexis Rodriguez

Thanks,

i did it.

kind regards,

Alexis Rodriguez


2018-06-15 00-21-10
Pedro Vila Nova

Between the 1st feedback message and your if use an input_focusFirst invalid.


Best regards

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