Add days to Date property using Function Alias

Requirement,

Filter records through report definition Filter a DateProperty + NoOfDays =< Current Date time.

No of Days will be retrieved through Dynamic System Setting. So I was writing function alias . where I can take the value from DSS.

DateProperty should be param to the function alias.

But I am un aware how to add the days to current value of DateProperty

Current code

String sColumnName = tools.getPrimaryPage().getString(".pyParameters(1).pyParametersParamValue");
String sDSSName= tools.getPrimaryPage().getString(".pyParameters(2).pyParametersParamValue").replaceAll("\"", "");

String setting =  pega_rules_utilities.getDataSystemSetting("clmsfw",sDSSName );

String result =  pega_rules_businesscalendar.addDays(sColumnName ,Integer.parseInt(setting),false,"");

Thanks in Advance

@Ishara Derek

Create a function alias having two parameters.

1st param will be taking date and 2nd will be taking DSS value.

in the source of the function alias, use this code

<p:choose>
		<p:when test=".pyParameters(1).pyParametersParamValue !=''">
			{1} + {2}
		</p:when>
        <p:otherwise>
			null
        </p:otherwise>
</p:choose>

where {1} refers to parameter 1 and {2} refers to your DSS value.