43
Views
9
Comments
Solved
How to check the value of uploading csv file -Outsystems11
Application Type
Reactive

I  want to check the value of uploading csv file 

For example 

A is the value of uploading csv file ,how i can check the value if is null

This is a run server Action 

Since I am uploading data to the database in this action, how do I go about checking the data when I have uploaded?

Does the number of values in the csv file match the number of values in the database?

...

How can i do it 

Help

CSV_CheckDemo.oml
2024-01-04 15-15-51
Abed Al Banna
Solution

Hi @Hora susuki 

To validate the data, based on your description, you have 2 steps of validation:

1. Add an If right after the LoadCSV2Record List, with the following condition:

LoadCSV2RecordList.IsSuccess

if True, continue to the for loop, otherwise raise an Exception as follows:


2. Inside the for loop, add another If with the validation that you would like to have in place, example:

ManagerStructuresList.Current.User <> "" and ManagerStructuresList.Current.Company <> ""

you will need to extend this condition as per your requirements.


Good luck!

UserImage.jpg
Hora susuki

Hi @Abed Al Banna 

Thank you for your clear and detailed expression, it has helped me well

UserImage.jpg
Hora susuki

Hi @Abed Al Banna 

I Have a question

ManagerStructuresList.Current.FAX_in = "^[0-9]*$" in if widge。

When I input "154848",why return false

Looking forward to your answer


UserImage.jpg
Puja Rani
Solution

Hi @Hora susuki ,

It does not work like that. To check if the entered value is number, you have pass that regex like this. You can add this action from dependencies. hope this helps.

UserImage.jpg
Puja Rani
Solution

Hi @Hora susuki ,

It does not work like that. To check if the entered value is number, you have pass that regex like this. You can add this action from dependencies. hope this helps.

2024-01-04 15-15-51
Abed Al Banna
Solution

Hi @Hora susuki 

To validate the data, based on your description, you have 2 steps of validation:

1. Add an If right after the LoadCSV2Record List, with the following condition:

LoadCSV2RecordList.IsSuccess

if True, continue to the for loop, otherwise raise an Exception as follows:


2. Inside the for loop, add another If with the validation that you would like to have in place, example:

ManagerStructuresList.Current.User <> "" and ManagerStructuresList.Current.Company <> ""

you will need to extend this condition as per your requirements.


Good luck!

UserImage.jpg
Hora susuki

Hi @Abed Al Banna 

Thank you for your clear and detailed expression, it has helped me well

UserImage.jpg
Hora susuki

Hi @Abed Al Banna 

I Have a question

ManagerStructuresList.Current.FAX_in = "^[0-9]*$" in if widge。

When I input "154848",why return false

Looking forward to your answer


UserImage.jpg
Puja Rani
Solution

Hi @Hora susuki ,

It does not work like that. To check if the entered value is number, you have pass that regex like this. You can add this action from dependencies. hope this helps.

UserImage.jpg
Hora susuki

Thanks @Puja Rani 

Regex_Search is not found


UserImage.jpg
Puja Rani

click on search in other modules , select it and then Add dependency.

2024-01-04 15-15-51
Abed Al Banna

You can find it under Text

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