AnsweredAssumed Answered

Need Trigger A Script while Pick A Module

Question asked by Suresh on Mar 31, 2015
Latest reply on Mar 31, 2015 by philmodjunk

Title

Need Trigger A Script while Pick A Module

Post

Hi Admins & Experts,

Here I make a Report it has a inbuilt default script. In this i just need to change as when I click the 'Report' Layout on that It should need to display yet today details of the date field.

For Ex:
Start Date: Jan 2, 2015
Completion Date: Mar 25, 2015
Start Date: Jan 15, 2015
Completion Date: Mar 29, 2015
Start Date: Feb 12, 2015
Completion Date: Apr 2, 2015
Start Date: Feb 23, 2015
Completion Date: Mar 28, 2015


In here, while I pick the Report Layout, it should display as,
#__Start Date__Completion Date
1__Jan 2, 2015__Mar 25, 2015
2__Jan 15, 2015__Mar 29, 2015
3__Feb 23, 2015__Mar 28, 2015

So Actually I need what the record has till today date value that should need to display in Report Layout!!

My Script is,

Enter Browse Mode[]
Go to Layout ["Report"]
If[Table1::Completion Date <= Get( CurrentDate )]
Sort Records[Restore; No dialog]
Else
Omit Record
End If

Was this script is correct? Or Actually this script need to be Triggered automatically whether I pick the Report Layout! It works very very few times only. i.e. when I click morethan 5 times only it works!! So only these much confusions!!

Help to do this better !!!

Thanks,
Suresh

Outcomes