Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
nishanthi_8
Creator
Creator

Dynamic Field value in the where condition

I have two table where month and year is used. I have attached the sample coding of that below :


Map_load:
Mapping load
"ID" ,
'Assigned' as PrjAssignment
Resident Assign
where Month_Year='Jun-2016';

//Assignment_Status:
join (Employees)
Load
"ID",
ApplyMap('Map_load',"ID",'Not Assigned') as Status

Resident Employees
where Month_Year='Jun-2016';

        Here the month and year should be dynamic for example if I have march,april,may it should take it dynamically without specifying in where clause like how it is done above. Any possible solutions for this ?

5 Replies
Not applicable

where Month_year=date(today(),'MMM-YYYY')

nishanthi_8
Creator
Creator
Author

TODAY will consider only today's month year for examply only july.But i have march and april also in the data how to fetch that

Not applicable

where Month_Year >= date(addmonths(today(),-4),'MMM-YYYY')

sasiparupudi1
Master III
Master III

Use as follows

Map_load:

Mapping load

Month_Year&'|'&ID ,

'Assigned' as PrjAssignment

Resident Assign;

//Assignment_Status:

join (Employees)

Load

ID,

ApplyMap('Map_load',Month_Year&'|'&ID,'Not Assigned') as Status

Resident Employees;

nishanthi_8
Creator
Creator
Author

Can you pls explain the logic for this ?