Forum Discussion

MaritzaAcosta's avatar
MaritzaAcosta
Qrew Trainee
3 years ago

Button help on formula text

Last year we made and finished an app for our company. And while we knew our information might change or be added to we knew it would never be truly finished. So it wasn't until yesterday when I was asked to add a new table to the app that I noticed  changes made to quickbase. we have 4 formula fields that are the same in all our tables in our app that do the same thing. 

when you click on In Compliance and N/A they do the same thing only change the status to that answer. but when you click Follow-up needed we have it so it pulls the information of that record and adds a new record on another table called 'actions'.
We have 17 tables with this system and they still work fine and do what they are suppose to do. I would edit them but since they work still I don't wanna touch the text to ruin it. 
The problem comes with the new table as I want to do the same thing but it looks like quickbase no longer supports javascript?
as we get this error for In Compliance/Follow-up Needed and N/A

I've tried deleting just the javascript part but it doesn't make my new table button appear like the other 17 tables. I'm unsure if I have to just rewrite the entire thing its self? Note that my company didn't learn this we had our QB start up consultant make the formula text and we basically just copied and pasted each time. 
I'll be putting the formula text below to see if it will help. 


This is the Formula for the button In Compliance

This is the formula text for Follow-Up Needed


And this is for N/A. which is essentially the same as In Compliance 


This new table that I created is going to be using the same buttons with the only difference being Yes/No/ N/A instead of In Compliance/ Follow up/ N/A  
As stated above I copied the text above just removed the javascript part but as you can see it just doesn't show up as an actual button. 
despite having display as button checked on 

I would appreciate any help. Thank you in advance.

------------------------------
Maritza Acosta Gonzalez
------------------------------

5 Replies

  • Please post your actual code by copy paste.  We cannot edit images.

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • MaritzaAcosta's avatar
      MaritzaAcosta
      Qrew Trainee
      Sorry about that. Okay here is the code for Incomplaince and N/a they are the same. 

      If(

      [# of Open FCE File Actions]<>0, "javascript:alert('There is an open action for this question. Please close out the question before marking question In Compliance')",

      "javascript:" &

      "$.get('" &

      URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=bg9b37dz5u7d4b8qz6gqcqq9wkr&_fid_11=In Compliance&rid=" & [Record ID#]&

      "',function(){" &

      "location.reload(true);" &

      "});"

      & "void(0);"
      )


      and this is the formula text for Followup needed:


      If(

      [Compliance]="Follow-Up Needed", "javascript:alert('This question is already marked as Follow-Up Needed')",

      URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&apptoken=bg9b37dz5u7d4b8qz6gqcqq9wkr&rid=" & [Record ID#] & "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_ACTIONS] & "?a=nwr&_fid_63=" &[Record ID#]& "&_fid_38=" &[Related Children Assignment]& " &nextURL=" & URLEncode(URLRoot() & "db/" & [_DBID_REPORTS] & "?a=dr&rid=" & [Related Childrens Report]))
      )

      ------------------------------
      Maritza Acosta Gonzalez
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        Sorry, but there may not be a way to have a pop-up message anymore. I can help you with the code to push a button and refresh the page if you like but there would not be a pop-up message.

        ------------------------------
        Mark Shnier (YQC)
        mark.shnier@gmail.com
        ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Qrew Champion
      Try these

      var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();
      var text EDIT = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=bg9b37dz5u7d4b8qz6gqcqq9wkr&_fid_11=In Compliance&rid=" & [Record ID#];

      If(
      [# of Open FCE File Actions]<>0, 
      $EDIT
      & "&rdr=" & URLEncode ($RefreshPage))



      and this is the formula text for Followup needed:


      If([Compliance]="Follow-Up Needed", 
      URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&apptoken=bg9b37dz5u7d4b8qz6gqcqq9wkr&rid=" & [Record ID#] & "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_ACTIONS] & "?a=nwr&_fid_63=" &[Record ID#]& "&_fid_38=" &[Related Children Assignment]& " &nextURL=" & URLEncode(URLRoot() & "db/" & [_DBID_REPORTS] & "?a=dr&rid=" & [Related Childrens Report]))
      )

      ------------------------------
      Mark Shnier (YQC)
      mark.shnier@gmail.com
      ------------------------------