Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

variable in script

Hi,

I have a field in my load script called 'STATUS'. Via applymap I translate this value into an Expression.

Now I want to create in the script a variable, that gives me the translated Expression back.

Currently I have in my script:

LOAD
...

STATUS as asset_statuscode
ApplyMap('map_coda_number_codes',STATUS) as asset_status,
...

FROM
$(DirDataQVD)efa_asset.qvd
(
qvd);

I tried this, but it is not working:

LET varCons = ApplyMap('map_coda_number_codes',STATUS) where STATUS ='1490'

Does someone of you have an idea?

Chris

17 Replies
Kushal_Chawda

or you can simply filter the Value in Mapping load itself

Not applicable
Author

Hi chanty,

thank you it works. But one last question.

I created this variable in a script-qvw (structure file).

My working qvw (it is a layout file) is filled binary with the data from script file.

In this layout file the variable is not there. I think it has something to do with the calcualtion.

Do you know what happens?

Chris

Chanty4u
MVP
MVP

if u do binary load   the sheet objects and  variables  will not come to ur Qvw.   only data model will appears.

u can copy objects if u hve same field names in current qvw.

Not applicable
Author

thank you very much to all of you.

It works now.

tamilarasu
Champion
Champion

I guess, Suresh was mentioned the semicolon at the end of the statement.

LET varCons = ApplyMap('map_coda_number_codes',1490) ;

t_chetirbok
Creator III
Creator III

)))) facepalm

tamilarasu
Champion
Champion

Anonymous
Not applicable
Author

LET varCons = ApplyMap('map_coda_number_codes',1490) ;