Currently in outsystem there is no XML dat type presents. Could you please explain how can we store XML values into an Entity. And also there is no MAX 'n' length available for "Text" Data Type, is there any alternative for this available in outsystems? Could you please let me ellaborate it?

Hi,

You can do this as follows:

  1. You convert the XML text to Binary using TextToBinaryData from the BinaryData extention.
  2. In your entity create a parameter of data type binary.

For retrieval use BinaryDataToText server action after retrieval of the record that contains the binary parameter.

Regards,

Daniel

Hi Daniel,

Thank you very much for your reply. 

Now I'm facing an issue with selecting the field name that holds the DataType as BinaryData. Its not listing out for Details screen to drag out for user input text area. Without placing the particular field how can I pass the necessary values to the DB.

Thanks,
Jagadeeshwaran M



Hi,

In preperation of your detail screen:

  1. Add a local parameter of type "Text"
  2. After retrieving the record use BinaryDataToText and assign the result to the local parameter created in step 1
  3. Add a Input widget and connect it to the local parameter created in step 1
  4. In the Save action, optionaly validate your input
  5. Convert the value of the local parameter created in step 1 to binary using TextToBinaryData and assign it to the binary attribute in the currect record of your aggrate.

Regards,

Daniel

Solution

Daniël Kuhlmann wrote:

Hi,

In preperation of your detail screen:

  1. Add a local parameter of type "Text"
  2. After retrieving the record use BinaryDataToText and assign the result to the local parameter created in step 1
  3. Add a Input widget and connect it to the local parameter created in step 1
  4. In the Save action, optionaly validate your input
  5. Convert the value of the local parameter created in step 1 to binary using TextToBinaryData and assign it to the binary attribute in the currect record of your aggrate.

Regards,

Daniel

Hi Daniel,


Thank you once again for your comments.

With your points I'm trying to build my application as said. But I have another one doubt regarding how to set the MAX length for input widget, lets say if user needs n length for a text input how we could make possible it here instead for giving the length like 500, 1000, 2000, etc.,.


Thanks,
Jagadeeshwaran M


Solution

You can leave the max length empty i think.

Daniël Kuhlmann wrote:

You can leave the max length empty i think.

Many thanks Daniel all its working fine now as expected Cheers. 

Will contact you further if any more doubts to me.

Thanks,
Jagadeeshwaran M


Hi Daniel,

As we discussed earlier we have brought the BinarytoText and vice versa for Add and Edit screen. Could you please also explain me on how can we do this for List screen as well.

I have created one local variable and action the text conversion into it, but I'm not sure how can we use this local variable for Table list to bind all the data. Could you please help in this.

Thanks,
Jagadeeshwaran M

Hi,

I would advice against doing this in the list screen. It would impact your performance.

How you have in mind to show this large portion of text on list screen?

If you plan to only show lets say first 50 characters, you could add some controlled reduncancy to your entity by adding another attribute of type text and fill it with the first 50 characters of the long text you store in the binary field.

Just make sure than when the binary is updated that this attribute is also automatically updated.

A benefit of this solution is that you can even decide to implement filter logic on it.

Regards,

Daniel


Jagadeeshwaran M wrote:

Hi Daniel,

As we discussed earlier we have brought the BinarytoText and vice versa for Add and Edit screen. Could you please also explain me on how can we do this for List screen as well.

I have created one local variable and action the text conversion into it, but I'm not sure how can we use this local variable for Table list to bind all the data. Could you please help in this.

Thanks,
Jagadeeshwaran M

Sorry Daniel, its working fine now for List screen as well, it was my mistake while assigning the conversion text to local variable.

Thanks,
Jagadeeshwaran M


Daniël Kuhlmann wrote:

Hi,

I would advice against doing this in the list screen. It would impact your performance.

How you have in mind to show this large portion of text on list screen?

If you plan to only show lets say first 50 characters, you could add some controlled reduncancy to your entity by adding another attribute of type text and fill it with the first 50 characters of the long text you store in the binary field.

Just make sure than when the binary is updated that this attribute is also automatically updated.

A benefit of this solution is that you can even decide to implement filter logic on it.

Regards,

Daniel


Hi Daniel,

Yes, I agree with you. But I'm just using this for my learning purpose and I'm sure I'll not use this steps for any real time applications.

Many thanks for your support and appreciating for your guidance.

Thanks,
Jagadeeshwaran M