Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to implement a logic that if %HPP_Summary_List contains 'HPPD' then if the field Pensionseinrichtung has a value 'CONTI' it will calculate [Total Commit] *0.2 , similarly for other values in it will calculate the sum total commit multiplied with a given percentage.
ELSE if the %HPP_Summary_List does not contain HPPD but oTher values, it will just return the value of Ttoal commit
The script is giving error:
if(match(subfield(subfield(%HPP_Summary_List,'_',1),'-',1, 'HPPD' and
(If(Match([Pensionseinrichtung], 'CONTI'),Sum(TOTAL {$<Pensionseinrichtung = {'CONTI'}, [Total Commit] *0.2) or
If(Match([Pensionseinrichtung], 'MER'),Sum(TOTAL {$<Pensionseinrichtung = {'MER'}, [Total Commit] *0.99),
[Total Commit],'Unknown' )))
Hi how are you??
your problem is that not only are you missing some closure of '()', but you are using set analysis statements in the script, this should not be done, the analsysis set is used in the graphics once the model is loaded in memory .
Now you want to use this scritp ??? you'll have to think about it better, you may have to use several load residents or proceeds, group by ...
it's more complex to do it in the script, luck!
Regards!!!!
hi,
there are many problems with the syntax, I corrected your expression in syntax
if(
match(subfield(subfield(%HPP_Summary_List,'_',1),'-',1),'HPPD') and
(
If(Match([Pensionseinrichtung], 'CONTI'),Sum(TOTAL {$<Pensionseinrichtung = {'CONTI'}>} [Total Commit] *0.2)) or
If(Match([Pensionseinrichtung], 'MER'),Sum(TOTAL {$<Pensionseinrichtung = {'MER'}>} [Total Commit] *0.99))),
[Total Commit] ,'Unknown' )
i hope i help you
Bye
Even though the code is not giving syntax error it is not giving me right results.For example for hppd data source Conti will have a value of total commit *.2 which is 8000 and for MER it should be total commit *.99= 3960 where total commit =40000.
But for some reason it is returning the total commit as 40000 because the condition fails to satisfy
Even though the code is not giving syntax error it is not giving me right results.For example for hppd data source Conti will have a value of total commit *.2 which is 8000 and for MER it should be total commit *.99= 3960 where total commit =40000.
But for some reason it is returning the total commit as 40000 because the condition fails to satisfy
Solved