Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2801

Re: Script Logic - How to give condition based on value

$
0
0

First of all it's a question of logic you want to implement...

What is the reason to run this script second time??? You copied the value and then cleared it in source...

 

If you want to copy only nonzero values then the script will be:

 

*LOOKUP SameCube //put the correct cube name!

*DIM PCFA:PC=CC.PC

*DIM FA=CC.FA

*ENDLOOKUP

 

*XDIM_MEMBERSET PC = DUMMY_PC

*XDIM_MEMBERSET FA = DUMMY_FA

*XDIM_MEMBERSET TIME = %TIME_SET%

*SELECT(%CCPCFA%,[ID],CC,[PC]<>"" AND [FA]<>"")

*XDIM_MEMBERSET CC = %CCPCFA% // Only CC with nonempty properties PC and FA

 

*WHEN CC

*IS *

*REC(EXPRESSION = (%VALUE%==0) ? LOOKUP(PCFA) : %VALUE%, PC=CC.PC, FA=CC.FA)

*REC(EXPRESSION = 0)

*END WHEN

 

LOOKUP will get a target value and in case of zero will write target over target - no change!

 

Vadim


Viewing all articles
Browse latest Browse all 2801

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>