Forum Discussion

CharlesDulaney's avatar
CharlesDulaney
Qrew Trainee
27 days ago

Multi-File Upload

I have been using the ole Magic Buttons "Multi-file Upload" with a code page for years, love it, but it does not function correctly with the new forms. It will add the files behind the scenes, but it will not return & refresh. If I use the back-button and refresh, all is good. - messy with new forms.

Is there a way to fix the ole Magic Buttons "Multi-file Upload" code pager to work with the new forms?

Now moving on to new forms....

Using the lates QB Plugin for drag & drop upload of files, it simply will not save the parent before adding files, which clearly creates a relationship mess if you continue. Removing the button on parent add records creates another mess of users not updating or adding files.

Within the button of execution, is there a way to save and go directly to uploading files when clicking the plugin button to add files? save the parent and enforce the upload of file(s).

 

 

  • I think there may be a way using a Rich Text field type and the SaveBeforeNavigating syntax, but I'm still testing, not quite there yet.

    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend

       I played around with it a bit, but I could not get the multi file upload to work in ad mode. I was able to get it to auto save the record and do the multi file upload, except the user then was left on the end of the multi file uploadscreen, and there is no way for the user to get back to the saved parent.

       

      I guess the best I could suggest would be to put a button on the form which would be called something like [Show multi file upload button].  That field would only show in add mode and would be located right beside the native Plug In Multi file upload button - the latter being hidden in Add Mocde).   What that field would actually do would be to save the record, and land the user  in View mode and they would now see use the multi file upload button which you have set to show in view mode or in edit mode.

      • CharlesDulaney's avatar
        CharlesDulaney
        Qrew Trainee

        Big thanks Mark, I have been struggling with this for a few days now.

        I contemplated a similar idea of hiding the QB buttons, creating my own save button, but calling it "Upload Files" - it would save the record and leave it in edit mode... now there is a record ID>0, so now show the plugin button.

        Thoughts?

        Thanks again Mark,

        Chuck

  • Should lend the user and edit mode on the newly created record. It needs to be a formula rich text field type.

    var text rid =
       If([Record ID#]>0,
          ToText([Record ID#]),
          "%%rid%%");

    var text url = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & $rid;

    "<a class='Vibrant Primary SaveBeforeNavigating' data-replaceRid=true href='" & $url & "'>Save & Keep Working - Rich Text</a>"

    • CharlesDulaney's avatar
      CharlesDulaney
      Qrew Trainee

      Thanks Mark,

      I'll flip back to the new forms and give this a try - I'll follow up...

      Chuck

      • CharlesDulaney's avatar
        CharlesDulaney
        Qrew Trainee

        Mark,

        Your button work nicely, but I like to control the button a bit more. My button works if the parent rid is available and fails when the parent is not yet established.

        // Begin button style
        var text bgcolor = "#F1948A";
        var text txtcolor = "black";
        var text style = "style=\"text-decoration: none; width: 100px; text-align: center; background:" & $bgcolor & "; border-radius: 5px; padding: 5px 0px; color: " & $txtcolor & "; display: inline-block; font: normal 700 28px/1 \"Calibri\", sans-serif; text-shadow: none;";
        // End button style
        
        var text rid = If([Record ID#]>0, ToText([Record ID#]), "%%rid%%");
        var text url = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & $rid;
        
        // Mark's snippet
        //"<a class='Vibrant Primary SaveBeforeNavigating' data-replaceRid=true href='" & $url & "'>Save & Keep Working - Rich Text</a>"
        
        // My update
        "<a " & $style &"'SaveBeforeNavigating' data-replaceRid=true href='" & $url & "'>Save & Keep Working - Rich Text</a>"