on 04-12-2016 1:37 AM
Hi Guys,
I have requirement to Copy data from one paycycle (Prev) to another Paycycle(Current) when Flag=1 otherwise it shouldn't do anything.
User input from the Input template
| Costcenter | HRACCT | SKF | Paycycle | Measure(Sign data) |
|---|---|---|---|---|
| 633014 | REOCCURING | SK201 | 2015.09.19 | 1 |
| 633014 | REOCCURING | SK203 | 2015.09.19 | 1 |
| 633014 | SPPY | SK201 | 2015.09.19 | -25% |
| 633014 | SPPY | SK203 | 2015.09.19 | -25% |
| 633014 | RECOORURING | SK201 | 2015.09.19 | 0 |
| 633014 | SPPY | SK201 | 2015.09.19 | 50% |
I want to read SPPY value when REOCCRING =1 from Paycyle 2015.09.19(PREV) to COPY Paycycle 2015.10.03 (Current). If REOCCURING =0 SPPY value shouldn't COPY . it shouldn't do anything.
I have Propertys PREV and CURR on Paycycle dimension my scope is resticting to PREV diemension.
I am attching the script which i developed, my scirpt is copying always even RECOOYRING=0 can anyone help how to acheve this one.
My expected outout should be like this
| Costcenter | HRACCT | SKF | Paycycle | signdata |
|---|---|---|---|---|
| 633014 | REOCCURING | SK201 | 2015.10.03 | 1 |
| 633014 | REOCCURING | SK203 | 2015.10.03 | 1 |
| 633014 | SPPY | SK201 | 2015.10.03 | -25% |
| 633014 | SPPY | SK203 | 2015.10.03 | -25% |
Hi,
Can you try the following syntax when performing an "IF" style statement on your REC line?
E.g.
*REC(EXPRESSION=%VALUE%>0?%VALUE%:0,PAYCYCLE=%whatever%)
So the above line is saying if the value of the record in scope is greater than zero, then move this value to your specified paycycle, otherwise zero.
If your second line was meant to multiply by SPPY if REOCCURING> 0, then something like this could work
*REC(EXPRESSION=%VALUE%>0?%VALUE%*([HRACCT].[SPPY]):0,PAYCYCLE=etc etc)
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Vadim.
how do i change destination , script is always accepting only one destiantion for two conditions.
*REC(EXPRESSION=(%VALUE%==0)? :%VALUE%, PAYCYCLE=%GV_ASSU_CURR%)
If it is 0 it shouldn't write anything back to database not zero also as you said. Can you please share any syntax which will allow two diffrent destantaions in my case like %GV_ASSU_CURR% and %GV_ASSU_PREV%
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.