22
Views
1
Comments
Checking the correctness of the entered data in the required format

Hello! Please help with creating a check for the correctness of the entered data.



There are 2 fields  "STEP NO", "PRIORITIES NO". Required format:

1. Allowed characters in the fields: integer, comma, colon (spaces can be allowed, but they will need to be removed using trim, replace)

2. The number of characters in the 'Step numbers' field and the number of characters in the 'Priorities' field in one record must match

3. The colon can be written only at the very end


Correct format: '2,3,4' or '1,2:' etc.

3.PNG

Hi

If both are not empty then split them using string_split action, and separator as " ",again join them(to removing un wanted spaces).

Now check the lengths. they have to be the same other wise through error(

Length(Trim(StepNumber_Join.Text))=Length(Trim(Priorities_Join.Text))

Now use the regular expression("^[0-9,:]+$") to validate the entered (spaces removed text)


If both regex returns true , then your data is valid else not valid.

Hope this helps,

Regards,

Rama