How to check if the column is empty

Hi,

Here's my question. I have a file and in the file there are several records. All the columns of the records are mandatory. I have already created the structure. Is there a quick why to check if the columns are null. Please help. Thanks in advance.

Best regards!

Hi Yi,

What kind of file is this? How are you reading and parsing it?

Kilian Hekhuis wrote:

Hi Yi,

What kind of file is this? How are you reading and parsing it?

I am reading excel file.I upload the file in the web page and read it.


So you're using the Excel To Record List? In that case, there's no easy way to check for "empty" if the columns do not contain Text (but Integers, for example). "Null" values (i.e. empty cells) will always get the default value (0, in case of Integers and Decimals).

Kilian Hekhuis wrote:

So you're using the Excel To Record List? In that case, there's no easy way to check for "empty" if the columns do not contain Text (but Integers, for example). "Null" values (i.e. empty cells) will always get the default value (0, in case of Integers and Decimals).

Yes,I'm using the Excel To Record List. Columns contain text data, date and numbers.


Why do you need to know if the column is empty?

Eduardo Jauch wrote:

Why do you need to know if the column is empty?

To load the data into database.


Hi Yi,

In Outsystems, there's no concept of NULL, except for Identifiers. That means it doesn't matter for storing something in the database whether an Integer value is present in the Excel or not: when it's not present, you can't set the Attribute to NULL anyway.

Kilian Hekhuis wrote:

Hi Yi,

In Outsystems, there's no concept of NULL, except for Identifiers. That means it doesn't matter for storing something in the database whether an Integer value is present in the Excel or not: when it's not present, you can't set the Attribute to NULL anyway.

Maybe I didn't describe my question clearly. For text cell I need keep the value not equal to "", for integer cell i need keep it not equal to 0. There are dozens of cells, and I need check all of them not empty. Because it will go wrong when I insert into db if any of them is empty.


Ok, I understand. But unfortunately, the answer is the same: it's not possible to detect this situation using the standard Excel To Record List. You may look in the Forge for a component for importing Excel files that can detect such a situation.

got it, thanks a lot