Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Have a requirement to make a selection active on a basis of Button. Following is working when its a single selection:
ActiveDocument.GetField(
"SFDC_OPPORTUNITY.Month"). Select ActiveDocument.Evaluate("monthname(today(0))")
where SFDC_OPPORTUNITY.Month is the tablename.fieldname from the Load Script which need to select based on the Button click.
The requirement says on the click of the Button, need to show last 12 months data starting from current month. How can that be programed in the embedded VBscript? Has anyone faced this kind of requirement before?
Any help is appreciated.
Thanks,
Gaurav C
Please consider it solved after lot of permutation and combination and offcourse help from google:
ActiveDocument.Fields("SFDC_OPPORTUNITY.Month"). Select ">=" & FormatDateTime(ActiveDocument.Evaluate("today(1)-365"))
This does the trick.
Thanks,
Gaurav C
could you post a QVW with an example of your data?
Please find attached a test qvw.
LTM - Lost Button need to select last 12 months. The current underlying macro is able to select the current month as per the code.
Thanks,
Gaurav C
Please consider it solved after lot of permutation and combination and offcourse help from google:
ActiveDocument.Fields("SFDC_OPPORTUNITY.Month"). Select ">=" & FormatDateTime(ActiveDocument.Evaluate("today(1)-365"))
This does the trick.
Thanks,
Gaurav C