Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Greetings for the day!
I have script as below:
Load * inline [
NAME,Value,Area,SubArea
JOHN,100,Area1,SA1
JOHN,110,Area2,SA2
JOHN,210,Total
CHRIS,210,Total
NANCY,101,Area1,SA3
NANCY,102,Area2,SA4
NANCY,103,Area3,SA5
NANCY,306,Total
ALEX,400,Total
];
As per my requirement i have to pass values dynamically into section access code like
If Area is 'Total' and and that user is not assigned to any other area (like CHRIS,ALEX) then
i have to pick NAME,TOTAL else i have to pick NAME,Value,Area,SubArea as like below code.
Section Access;
If Area = 'Total' and not assigned to other Area then
Load NAME,Area resident Data;
else
Load NAME,Area,SubArea resident Data;
endif
section application;
Is there any possiblity on this? If yes Could you please help me here.
Thanks,
QV11 User
Yes that should be possible
Temp:
NAME, Value,Area,SubArea
Result:
LOAD NAME, NAME as CHECK, Area
RESIDENT Temp
WHERE Area <> 'Total';
CONCATENATE(Result)
LOAD NAME, Area
WHERE Area = 'Total' AND NOT Exists(CHECK,NAME);
DROP TABLE Temp;
SECTION ACCESS;
LOAD * RESIDENT Result;