How to define the check box with text Not Boolean

Hi 

i have the form with check boxs that data type is "Text" . 

The request  is  to defined by the "1" or " 0" in check box with Text data type.

The problem is that how to define the Text data type in the check box widget?

This is for the web app.

Thank you in ahead.

Work flow:display all data in the form , edit , check uncheck and update.


Hi EiMon,

My question is first: Why would you want that? I am assuming it comes from an external data source. Wouldn't it be easier to map your data to a boolean value? In that way you only have to deal with the text value in 1 place and you can use the boolean in your whole application.

Orla

Hi EiMon, 


Outsystems provide the checkbox variable datatype always Boolean. We can't change it to other datatype.   

You can manage your requirement with Boolean variable in Action.   

Orla Dijkink wrote:

Hi EiMon,

My question is first: Why would you want that? I am assuming it comes from an external data source. Wouldn't it be easier to map your data to a boolean value? In that way you only have to deal with the text value in 1 place and you can use the boolean in your whole application.

Orla

Hello Orla

 Thank you for your reply.

Yes.it comes from the external data source.No right and no permission to change the data type.

where  do i map the text value (0 or 1) to boolean value? 

one more thing how can i update the external DB  in the outsystems?There is no aggregate .

Thanks again 


Hi EiMon,

If you create the connection to the external database from Integration Studio you can define the data types of each attribute. These are the data types that will be used in OutSystems. I think you should be able to set it to boolean here.

You can use entities from an external database the same as you would a normal entity in OutSystems. If you are allowed to update depends on the rights you have on the database as well of course. 

Orla Dijkink wrote:

Hi EiMon,

If you create the connection to the external database from Integration Studio you can define the data types of each attribute. These are the data types that will be used in OutSystems. I think you should be able to set it to boolean here.

You can use entities from an external database the same as you would a normal entity in OutSystems. If you are allowed to update depends on the rights you have on the database as well of course. 


Hi Orla

Changing the data type in the Integration Studio can affect to the external database?

let`s say, i changed the data type in the integration studio, then the data  becomes boolean in the outsystems but in the external the data type is still "Text" type. 

Is it called mapping?

Thanks 

Hi EiMon,

Cjanging the datatype in Integration Studio has no effect on the external database. You should however test it well if you're getting the expected results, especially if you are writing to the database as well. I am expecting that the mapping between '0' and '1' and the boolean values can be made since these are normal values for booleans, however I have never tested this myself.