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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
Pallavi Phade Profile Picture

Pallavi Phade 102 Super User 2026 Season 1

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2026 Season 1

#3
ManoVerse Profile Picture

ManoVerse 53 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans