imcompatible data types in expression or assignment

hkeskin

New Member
Hi,

I have smart window, smart tool bar, smart dataviewer. When I click add new record from smart tool bar, I want to put some value into disabled fill-in object on smartdataviewer. I put my code in addrecord procedure in smartdataviewer--> RowObject.UserCode:SCREEN-VALUE IN FRAME {&FRAME-NAME}=myVariable.

but it failed. it says "imcompatible data types in expression or assignment". How can do this?

Thanks in advance,
 
You don't talk about versions ...

The SCREEN-VALUE attribute of any widget is of data type character. Therefore, you either need to use a character variable or convert it with the STRING ( ) function.

Heavy Regards, RealHeavyDude.
 
While STRING ( yourVariable ) will always work at compile time you might hit a run time error when the content of the character variable can not be converted into the data type of the widget.

In your example it will work because both, the widget and the variable are of the same data type. Therefore it is good practice that the variable and the widget are of the same data type

Heavy Regards, RealHeavyDude.
 
Back
Top