Forum Discussion

MichaelVanDrune's avatar
MichaelVanDrune
Qrew Member
4 years ago
Solved

Clear contents of Logged Approval Field

I have created a workflow where I use Multiple Choice Text Fields to record e-Signatures. The choices are Approve, Request Rework and Denied. I also have a Logged Notes Field for each Approver.

The problem is that if someone in the workflow Requests Rework, the Originator is notified and makes the necessary edits.

The problem lies with resetting the workflow. What I want to do is Clear the e-Signature fields completely but leave the Logged Notes but I cannot find a way to automate this.

Does anyone have a reliable solution for this OR can teach me about a better workflow method in Quickbase?

Thanks. Mike

------------------------------
Michael Van Drunen
------------------------------
  • It is possible to make a formula URL button which changes the field properties of the field to make it not be a logged field, and then clear the contents of the field for that one record, and then change the field properties back again to make a logged field. This can be done with a formula URL button that a user clicks however they would need to have admin privileges to edit field properties.

    We now have a new tool, Pipelines,  and indeed a Pipeline can run a QuickBase API. So in theory a pipeline could be set up to do the same thing which is to edit the field properties then clear the field on that one record and then reset the field properties to logging again.

    The good thing about pipeline is that it runs under its own credentials and it doesn't matter what permissions to the user has the pipeline will still run OK.

    If you have never worked with pipelines before then it is probably beyond the scope of what I can offer on this forum to walk you through how to do that, but I could help you on a one on one basis if you like. Contact me via my email signature line.   Or if you do have pipeline experience but are stuck on one small aspect I'm willing to try to help on this forum..

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------

3 Replies

  • It is possible to make a formula URL button which changes the field properties of the field to make it not be a logged field, and then clear the contents of the field for that one record, and then change the field properties back again to make a logged field. This can be done with a formula URL button that a user clicks however they would need to have admin privileges to edit field properties.

    We now have a new tool, Pipelines,  and indeed a Pipeline can run a QuickBase API. So in theory a pipeline could be set up to do the same thing which is to edit the field properties then clear the field on that one record and then reset the field properties to logging again.

    The good thing about pipeline is that it runs under its own credentials and it doesn't matter what permissions to the user has the pipeline will still run OK.

    If you have never worked with pipelines before then it is probably beyond the scope of what I can offer on this forum to walk you through how to do that, but I could help you on a one on one basis if you like. Contact me via my email signature line.   Or if you do have pipeline experience but are stuck on one small aspect I'm willing to try to help on this forum..

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Qrew Champion
      Michael did mostly figure this out but for some reasons the forum did not let him post his reply publicly.

      Message From: Michael Van Drunen

      So, I was able to get this code working, I Click the button and the Logged entry is cleared. I do receive a Message which I would prefer no come back on screen. How can I avoid this message.

      Thanks, Mike

      URL Button Code (with App Token replaced with xxx)

      var text ClearNotesAppendOnlyIMUndo =

      URLRoot() & "db/" & Dbid() & "?a=API_SetFieldProperties"&
      "&fid=6&append_only=0"&
      "&apptoken=xxx";

      var text ClearIMApproval =

      URLRoot() & "db/" & Dbid() & "?a=API_EditRecord"&
      "&rid=" & ToText([Record ID#]) & "&_fid_6="&
      "&apptoken=xxx";

      var text ClearNotesAppendOnlyIMRedo =

      URLRoot() & "db/" & Dbid() & "?a=API_SetFieldProperties"&
      "&fid=6&append_only=1"&
      "&apptoken=xxx";


      //var text Display = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & ToText([Record ID#]);


      $ClearNotesAppendOnlyIMUndo
      & "&rdr=" & URLEncode($ClearIMApproval)
      & URLEncode("&rdr=" & URLEncode($ClearNotesAppendOnlyIMRedo))

      Message received in Browser

      <qdbapi>

       

       

      <action>API_SetFieldProperties</action>

       

      <errcode>0</errcode>

       

      <errtext>No error</errtext>

       

      <fid>6</fid>

       

      <fname>Test Approval</fname>

       

       

      </qdbapi>



      ------------------------------
      Mark Shnier (YQC)
      Quick Base Solution Provider
      Your Quick Base Coach
      http://QuickBaseCoach.com
      mark.shnier@gmail.com
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        np, you just need a 4th redirect to redisplay the record. 

        These formula URLs need to end with a display of a record or a report, or else they will spew out the most recent XML response from the last API on the screen.




        $ClearNotesAppendOnlyIMUndo
        & "&rdr=" & URLEncode($ClearIMApproval)
        & URLEncode("&rdr=" & URLEncode($ClearNotesAppendOnlyIMRedo))
        & URLEncode(URLEncode("&rdr=" & URLEncode($Display)))

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------