Validation

how to check given phone number exists or not in database

Hi Shanmuga,

 I have created phone number validation on button click as well as onchange. Please check the attached OML file 

I hope this OML helps you. 

Thanks,

Purva

PhoneNumberValidation.oml

Hi Shanmuga,

For checking records exists or not in database you can use aggregate to query with filter phone number attribute = the given one. Then if aggregate return empty list => the given one is not existed.

You can write above code into a server action and call it to check. OR you can query all phone number at one (using aggregate) then checking in client action by using ListAny from System reference.

Regards,

Khuong

Hello  SHANMUGA PRIYA ,

I have create sample demo screenname(numbers,numbersdetails) and attached working URL as well.
note(only validation for checking number present or not rest things not implemented)

https://akshayproject.outsystemscloud.com/Rolecheck/Numbers

Thanks and Regards,

Akshay Deshpande

NumberValidation.oml

Hi Shanmuga,

Two scenarios you can consider:

  1. You are just checking for a Phone Number - use an Aggregate to check the Entity you use to check for Phone Numbers, applying a filter on the Entity Attribute with the Phone Number you want to check
  2. You are implementing a CreateOrUpdate CRUD Action - Use an Aggregate on the CRUD Action to check for at least 1 record on the Entity, that has a DIFFERENT Entity Identifier than the one you are trying to Create or Update, and has the SAME Phone Number of the record you are trying to Create or Update

Hope this helps.

Best regards,

Paulo Moreira

Hi Shanmuga,

 I have created phone number validation on button click as well as onchange. Please check the attached OML file 

I hope this OML helps you. 

Thanks,

Purva

PhoneNumberValidation.oml

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