Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi All,
Need help on expression:
I have a date calendar, I want to show Selected Month and Year in two text boxes. Conditions are as below:
e.g. 2013 selected, show DEC & 2013
3. If Year only selected and that is Current year default to Current month & current year in boxes.
e.g. 2014 selected, show Sept & 2014
4. If Year, Month selected – show as selected in boxes.
5. If Day only selected, show the current month and current year in boxes.
6. If month only selected, show current year and current month.
Can anybody help?
Thanks,
Lakshmi.
 MayilVahanan
		
			MayilVahanan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi
Try like this
= 'Month: ' & if(GetSelectedCount(Day) <> 0 and getselectedcount(Month) = 0 and getselectedCount(Year) = 0, Month(Today()), if(Max(Year) = Year(Today()) and getselectedcount(Month)=0, Month(Today()), Max(Month)) )
 MK_QSL
		
			MK_QSL
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		=IF(GetSelectedCount([Invoice Date]) > 0 ,Month([Invoice Date]),
IF(GetSelectedCount(Year) = 0 and GetSelectedCount(Month) = 0, Month(Today()),
IF(GetSelectedCount(Year) > 0 and GetSelectedCount(Year) = Year(Today()), Month(Today()),
IF(GetSelectedCount(Year) > 0 and GetSelectedCount(Year) < Year(Today()), SubField('$(MonthNames)',';',Max(Month))))))
 
					
				
		
Hi Manish,
Thanks a million, it is working. Can I move these 2 values in to 2 variables? basically I needs get count of a field based on the 2 variables.
Thanks,
Lakshmi.
 MK_QSL
		
			MK_QSL
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can... Kindly close this thread by selecting appropriate answer
