Discussions

Expand all | Collapse all

Hide Button (link url filed) on form after click

  • 1.  Hide Button (link url filed) on form after click

    Posted 06-07-2018 16:30
    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#])


  • 2.  RE: Hide Button (link url filed) on form after click

    Posted 06-07-2018 17:24
    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#])
    )


  • 3.  RE: Hide Button (link url filed) on form after click

    Posted 06-07-2018 17:29
    Bah that was too easy!!  Just added form rule and took care of it.  Really appreciate the response.  Was over thinking it I guess ;-) 


  • 4.  RE: Hide Button (link url filed) on form after click

    Posted 06-08-2018 17:57
    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.