Can I have a URL button that when clicked changes the date to today and prompts me to enter data in another field?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
I am setting up a tracker that when you click the url button "Check Out" it would populate the date field with the current date and time. The formula I have for this works, but I need it to also prompt me to enter the name of the person that checked it out to complete the record. I have attached a screen shot of the form I am using. 

When the "Check Out" button is pressed the record updates the "Check Out Date" field with the current date and time and changes the "Status" to "Checked Out". Once the "Status" is "Checked Out" the "Check In Button" becomes available. This button will be used to change the "Check in Date" to the current date and time and change the "Status" to "Available"

So I just need the "Check Out Button" to prompt me to select a name from the "Checked Out By" list. Here is the formula for that button so far:

var text url =

  URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &

    "&rid=" & [Record ID#] &

    "&apptoken=7j4d9pb32v53kdzjmua4cye8u6u" &

    "&_fid_12=Checked Out" &

    "&_fid_7=" &Now();

If([Status]="Checked Out","",

"<a class=\"Vibrant Primary\" href=\"javascript:" & "$.get('" & $url &

    "', function(){" & "location.reload();" & "});" &

    "void(0);\">Check Out</a>"

)





So what can I do to add this final element to my formula?
Photo of Andreonna

Andreonna

  • 1,040 Points 1k badge 2x thumb

Posted 3 years ago

  • 0
  • 1
Photo of Neal

Neal

  • 70 Points
I have created prototype spreadsheet screenshot of your requirement.

(1)


Record#1 shows that item is available for checkout and CheckOutLink(Button) is available for checking out.

(2)


Andreonna checks out item.


Record#2 shows that item is checked out by Andreonna with checkout-time and CheckInLink(button) is shown.

Item Status after checking out item is "Checked Out".

(3)

Andreonna checks in item.

Record#3 shows that item is checked in by Andreonna with checkin-time and CheckOutLink(button) is shown.

Item Status is "Available" (i.e. Available for checkout)
Photo of Andreonna

Andreonna

  • 1,040 Points 1k badge 2x thumb
Yes this is essentially what I am looking for, however, I will be checking them in and out for others. So I need to be able to populate that field with a different name each time.