How to Extract data from binary data and store it in Entity?

Extract data from binary data and store the values from the binary data in the entity

Its depends on how you want to store it in the entity. You can store binary data as is using the binary data type. 

However if you want to parse and process the information. Depending on the type of data in the binary you can use different methods to extract data.

https://success.outsystems.com/Documentation/11/Reference/OutSystems_APIs/BinaryData_API



Hello,

Could you explain with more detail what are you trying to accomplish?

You can have an entity with an attribute binary, so it is possible to store the binary itself (for example, a file).

Other than that, if you need to "extract" something from the file, you need to know what type of file it is: Excel? Word? Text? And then use the properly statement or extension (binary extension, a component from Forge, etc) to open the file or convert it to the desired format.

Cheers.

Hanishq PM wrote:

Extract data from binary data and store the values from the binary data in the entity

Hi Hanishq,

If I understand correctly, You need to convert your binary data into text, then split the string on the basis of separators, then use string_split.list[0].text.value  to store in first column and so on.


check this discussion.

hope it helps

Regards

Seema




Eduardo Jauch wrote:

Hello,

Could you explain with more detail what are you trying to accomplish?

You can have an entity with an attribute binary, so it is possible to store the binary itself (for example, a file).

Other than that, if you need to "extract" something from the file, you need to know what type of file it is: Excel? Word? Text? And then use the properly statement or extension (binary extension, a component from Forge, etc) to open the file or convert it to the desired format.

Cheers.

I'm downloading excel from box using the URL.And converting the URL to Binary data.

Then the data inside the  Binary data needs to be extracted and placed in their Entity Attributes.

If the excel is "simple", just a series of columns with a header and data, you can create a structure that represents the excel columns structure and use the ExcelToList (https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Traditional_Web/Web_Logic_Tools/Excel_To_Record_List) to create a list. After that, you can iterate the list and create records based on it.

If the excel is not simple, you will need a component from Forge that is able to "open" the excel and then you will use its methods to read data. You can find some different components in forge.

Cheers.

I would suggest Advanced Excel. It is actively maintained and has many features.

Eduardo Jauch wrote:

If the excel is "simple", just a series of columns with a header and data, you can create a structure that represents the excel columns structure and use the ExcelToList (https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Traditional_Web/Web_Logic_Tools/Excel_To_Record_List) to create a list. After that, you can iterate the list and create records based on it.

If the excel is not simple, you will need a component from Forge that is able to "open" the excel and then you will use its methods to read data. You can find some different components in forge.

Cheers.

Suggest me a method to change the URL to Binary data. The current method I'm using doesn't giving me a perfect binary data.. 


Store Excel as binary

ExcelToRecordList 


Hi Hanishq,

I'm not sure I understand what you mean. A URL is a path to a resource, Binary Data is actual data, not the path to it. "change the URL to Binary data" just doesn't make sense.

Also, what "current method" are you talking about? And what is "perfect binary data"?

Bruno Gonçalves wrote:

Store Excel as binary

ExcelToRecordList 


It's perfect. But I want to download a Excel from box storage and place the data directly into the outsystems Entity.


Hanisq,

What do you mean by "place the data directly into [...] [an] entity"? Do you want to store the file as-is, or do you want to parse the data in the Excel by using the Excel To Record List, and then store each row as a record in the Entity?

Kilian Hekhuis wrote:

Hi Hanishq,

I'm not sure I understand what you mean. A URL is a path to a resource, Binary Data is actual data, not the path to it. "change the URL to Binary data" just doesn't make sense.

Also, what "current method" are you talking about? And what is "perfect binary data"?

Make it clear..

I want to download an Excel file from Box storage and place all the Excel data into the Entity Attributes in Outsystems. Help me.


Hi Hanisq,

Excel To Record List converts the Excel into a List, with the columns being Attributes if you supply the right Stucture. Eduardo already pointed you to the right documentation in case you need it. Once you got that List, it's a matter of looping over it (For Each) and storing the data using a CreateXxx Entity Action.

Kilian Hekhuis wrote:

Hi Hanisq,

Excel To Record List converts the Excel into a List, with the columns being Attributes if you supply the right Stucture. Eduardo already pointed you to the right documentation in case you need it. Once you got that List, it's a matter of looping over it (For Each) and storing the data using a CreateXxx Entity Action.

Hi Kilian Hekhuis ,

But I want to Download an Excel.. Not to load from Local Disk.


Hanishq,

I don't understand. Excel to Record List has a Binary as input, regardless of where it came from. Loading a file from local disk is done via the Upload Screen Widget, which has nothing to do per se with Excel to Record List.

Kilian Hekhuis wrote:

Hanishq,

I don't understand. Excel to Record List has a Binary as input, regardless of where it came from. Loading a file from local disk is done via the Upload Screen Widget, which has nothing to do per se with Excel to Record List.

We have to give Binary as input.Correct..But, Where do we get the binary data while downloading it from Box Storage?


Pass the URL to this action

@Bruno: Hanishq is talking about Box storage. Are you sure you are giving him the right advise?

Hi Hanishq,

Do you use the Box Connector to retrieve the file? If not, how are you retrieving the file?


Let's see