web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Trying to add a toggle to the accounts form, that when selected as "Yes", turns on a visible counter that counts up

(0) ShareShare
ReportReport
Posted on by 42

Hello,

I am trying to do something that I keep running into walls over. I've created a new field on the "Accounts" form called "Am I late?" and it is a toggle switch with "Yes" or "No' options. What I would like is to have a time beside it, under it, on top of it, called "I am late by", which displays the total time since that "Am I late?" toggle was turned on. Is there anyway to:

1) Create such a timer

2) Link it to the "yes" option of the "Am I late" field?

I have the same question (0)
  • Suggested answer
    Deekshitha Reddy Profile Picture
    219 on at

    Yes, It is possible. I coded on card page.

    field(AmILate; Rec.AmILate)//AmILate is of type Boolean

                   {

                       trigger OnValidate()

                       begin

                           IF AmILate= true then

                               Rec.time1 := Time;

                       end;

                   }

    trigger OnOpenPage()// Checks when the page opens

       begin

           if Rec.AmILate = true then begin

               Rec.time2 := time;

               Rec.Duration := Rec.time2 - Rec.time1;

               Rec.Modify();

           end;

    // Here time1 and time2 are fields of type time, Duration is a field of time duration.

    Please Let me know.

    Hope this Helps.

    Thankyou.

  • DevOs Profile Picture
    42 on at

    Hello Deekshitha,

    Thank you for replying. Am I supposed to use this within the formula option for a new field on the form?

  • Suggested answer
    Deekshitha Reddy Profile Picture
    219 on at

    I didn't get you, try referring to below image.

    time1 is the  time when you set the togggle true& time2 is the time when you open the page.

    pastedimage1682598231118v1.png

    Hope this helps.

    Thankyou

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 109

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 78 Super User 2026 Season 1

#3
Martin Dráb Profile Picture

Martin Dráb 58 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans