Formula URL Working Intermittently

  • 1.  Formula URL Working Intermittently

    Posted 04-11-2018 18:10
    I have a Formula URL button that is working intermittently.

    Sometimes it will work and refresh the page. Other times it will go directly to edit the record it pertains to.

    If I click the URL button/image with CTRL + Click to open in a new tab, it will edit and refresh current page and open the record edit page in a new tab. Essentially performing the operation but still opening the edit record page.

    Other times, I click the URL and it will edit the record and refresh to current page.

    Any ideas?

    The way the formula is written, it only shows the button if condition is met, and then uses a checkbox field to determine the image URL, only operating on a second field and editing a date if other conditions are met. Other than the occasional quirk it works perfectly fine.

    If([InstallStatus] = "Installed",
        var text urlyes =
            URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=bpex6r9cehf3tv575f5mcc4zthh&rid=" & [Record ID#] & "&_fid_204=1";
        var text urlnodate =
            URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=bpex6r9cehf3tv575f5mcc4zthh&rid=" & [Record ID#] & "&_fid_204=0" & "&_fid_250=" & ToText(Today());
        var text urlno =
            URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=bpex6r9cehf3tv575f5mcc4zthh&rid=" & [Record ID#] & "&_fid_204=0";
        If([Needs Audit] = false,
            "<center><a href=\"javascript:" & "$.get('" & $urlyes &
            "',function(){" & "location.reload();" & "});" &
            "void(0);\"><img src=\"https://images.quickbase.com/si/32/203-info.png\"></a></center>";,
            If([Online] = false and ToDays(Today()-[Last Audit Email Date]) >= 7 or [Online] = false and IsNull([Last Audit Email Date]),
            "<center><a href=\"javascript:" & "$.get('" & $urlnodate &
            "',function(){" & "location.reload();" & "});" &
            "void(0);\"><img src=\"https://images.quickbase.com/si/32/204-warning.png\"></a></center>";,
            "<center><a href=\"javascript:" & "$.get('" & $urlno &
            "',function(){" & "location.reload();" & "});" &
            "void(0);\"><img src=\"https://images.quickbase.com/si/32/204-warning.png\"></a></center>";