Forum Discussion

ITSupport's avatar
ITSupport
Qrew Trainee
6 years ago

Hide Button (link url filed) on form after click

I have a Button on a form (link Url Field) that is used for Approval.  It then populates another field  that is Text Multiple Choice called Approvals with ex:  "[JUN-07-18 IT Support] Approved "  and fires off some email notifications etc.  

I would like this button to not show or be grayed out after it has been clicked once. Were having users repeatedly clicking Approve Button and not knowing they have already approved (not sure why they don't check the status first) so this creates duplicate notifications and confusion.  Any help would be appreciated or if this has been resolved in another post if you could point me there.

this is the formula on the Button URL Field which works well

URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=5t39dmb9j59pjdz6mj9hd55p9rd&_fid_48=Approved&rid=" & [Record ID#] & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?act=dr&rid=" & [Record ID#])

3 Replies

  • You can use a dynamic form rule to hide the button when the status is Approved.

    Example:  When Status is equal to Approved hide the Approval Button.

    Or you can wrap your code in a IF statement to hide the button on the form when the Status is Approved.

    If([Status]="Approved"," ",
    URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=5t39dmb9j59pjdz6mj9hd55p9rd&_fid_48=Approved&rid=" & [Record ID#] & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?act=dr&rid=" & [Record ID#])
    )
  • Bah that was too easy!!  Just added form rule and took care of it.  Really appreciate the response.  Was over thinking it I guess ;-) 
    • GilbertSpigelm2's avatar
      GilbertSpigelm2
      Qrew Cadet
      I would use Jim's second option of using an If statement. We do the same because you only make the update once. If you start placing the button on multiple forms, you have to update the form rules on each one.