• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Create a field that records time box is checked

New Here ,
May 13, 2022 May 13, 2022

Copy link to clipboard

Copied

I'm trying to create a simple weekly task list. I want to create a field, in this case it would be "MCB1", that when I press that button, the box (MCB1) will show the current date and time. Although I found a way to populate the date and time in the box, the field updates whenever other box is pressed. I was hoping to find a way to record the date and time and not have field update again.

TOPICS
JavaScript

Views

616

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 14, 2022 May 14, 2022

Set condition to populate field only when it's empty:

if(this.getField("MCB1").valueAsString  == ""){
//Your script goes here...
}

Votes

Translate

Translate
Community Expert ,
May 14, 2022 May 14, 2022

Copy link to clipboard

Copied

What script does you use? Where does you use the script?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 14, 2022 May 14, 2022

Copy link to clipboard

Copied

LATEST

This is the one I found online. MB1 is a check box that you would have to push to fill in the date/time for MCB1.

event.value = this.getField("MB1").value=="Off" ? "" : util.printd("HH:MM", new Date());

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 14, 2022 May 14, 2022

Copy link to clipboard

Copied

Set condition to populate field only when it's empty:

if(this.getField("MCB1").valueAsString  == ""){
//Your script goes here...
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines