Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
It is possible to use ApplyMap and inside Sub field?
I need somethings like this
MAP_TURBINE:
Mapping load * inline [
Turbine, NormTurb
WTG01, E1
WTG02, E2
WTG03, E3
WTG04, E4
WTG05, E5
WTG06, E6
];
ApplyMap('MAP_TURBINE', SubField(FileBaseName(),'_',4) then NormTurb, SubField(FileBaseName(),'_',4) as Turbine;
I know that the script is wrong, but I want if SubField(FileBaseName(),'_',4) = WTG01 or WTG02 ... or WTG06 so I need to rename in NormTurb.
Thanks for any help
Pasquale
Maybe in this way:
ApplyMap('MAP_TURBINE',
if(match(SubField(FileBaseName(),'_',4), WTG01, WTG02, ..., WTG06), NormTurb, SubField(FileBaseName(),'_',4)), 'ApplyMapDefaultValueForNotFound') as Turbine;
- Marcus