Question3Replies58Views TanmayG5 Member since 2020 4 posts Wipro Ltd Posted: 1 month agoLast activity: 1 month 2 weeks ago How to define a function in pega?Hi guys,In my low code app, I want to fetch the current time and in every 10-sec interval I want to refresh a particular section in my app. For fetching the current time I checked that I need to define a function.https://collaborate.pega.com/question/current-timeI'm checking this link. But I could not understand where and how to define this function in Pega. Pega Platform 7.1.2 Low-Code App Development Dev/Designer Studio Consumer Services Front-End Developer ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Posted: 1 month agoRakshith PEGA replied to TanmayG5Hi Tanmay, Set a property to current date time and use the same property on Section refresh condition. Posted: 1 month agoIsh_96 HCL replied to TanmayG5Hi,You can also use Data Transform instead of Activity and call the Data Transform while Refreshing the section.To get the Current Time with pattern and time zone you can use the below function:@DateTime.FormatDateTime(@DateTime.CurrentDateTime(),"hh:mm:ss a","America/New_York","en_US") Output : Posted: 1 month agoTanmayG5 Wipro Ltd replied to Ish_96Hi Ish_96,As you mentioned I created a Data Transform named as Curr_Time. But when I try to call the same in Refresh condition into the section I could not found the Data Transform instance.I'm attaching the screenshots of both. Please check and let me know what needs to be done.