General DFFS enhancement suggestions

Home Forums Requests General DFFS enhancement suggestions

Viewing 62 reply threads
  • Author
    Posts
    • #16181
      Keith Hudson
      Participant

        Alex;

        I’m starting this topic as a place to put general enhancement suggestions (not feature requests). If you find it valuable, perhaps it could become a “sticky” topic that always shows near the top of the Forum topics for DFFS so it is easy for users to find.

        I currently have 3 non-feature suggestions:
        1. Change the naming of new versions of DFFS to the format YYYY-MM-DD so that when we download the zip files, they will automatically sort in chronological order. (Right now, I sometimes remember to create a new folder for each new download and use that date format as the folder name, but making it a standard would simplify the process of knowing which release is the latest.

        2. Instead of using html files for CEWP links, use text files. For example, instead of Installer_CEWP_code.html make it Installer_CEWP_code.txt. The advantage of using a txt file instead of an html file is that a user can see and modify the contents of a txt file much easier that an html file. For instance, in the current environment I work in, html files will not open in the browser, but instead I must download the html file and open it from my hard drive.

        I recognize that for backward compatibility when upgrading from one version to another of DFFS you might have to maintain both an html version of the file and a txt version of the file, so it might not be worth the extra work to do so.

        3. Create a ‘sticky’ topic in this forum for bug reports and/or beta testing reports.

      • #16217
        Alexander Bautz
        Keymaster

          Hi Keith,
          Sorry for the late reply – I’ve been busy trying to sort out a few issues with the latest BETA.

          This is good ideas and I’ll stick it to the top – and will look at changing the “naming” of the future DFFS versions.

          Thanks!

          Alexander

        • #16230
          avala
          Participant

            Thanks for making this a sticky post!

            If possible, I’d like the ability to restore a previous version of the DFFS configuration from the DFFS new/edit/display config page. I know we can use versioning in the SPJS-DynamicFormsForSharePoint list to restore a previous version, but I’ve had a few occasions where I’ve been in the config page and wished I could revert from there after testing a change.

          • #16659
            Keith Hudson
            Participant

              How to know which version of DFFS is installed, and how to update easily to another version
              1. Provide an easy way to know which version of DFFS is installed in the DFFS folder within the SPJS Library. I do this for myself right now but simply adding a text file with a name that reflects the version. For instance, my most recent installations have a text file in the DFFS folder named “DFFS version 2017-02-25.txt”. This lets me know at a glance which version of DFFS I am using. When I download a new version of the DFFS files and unzip the zip file, I rename the DFFS folder to include the version date. This way, I can have several versions of DFFS installed in a single site and switch between them almost instantly simply by changing the folder names. Whichever folder is named “DFFS” (without any date component) is the active version.

              Request to Alex: please include a text file (like I have explained above) in future versions of DFFS to give users an easy way to know which version of DFFS is installed.

              • #16669
                Alexander Bautz
                Keymaster

                  Thanks for the input – I’ll add this file. Also, from the next version you can add a folder named “DFFS_NEXT” and use a URL key like this to test-load the new version from this folder without the need to rename the existing folder – the test load will only apply to the user who set the URL key:

                  .../Lists/YourList/NewForm.aspx?DFFS_NEXT=1

                  As this feature requires some changes to the code it will unfortunately only work when updating past the upcoming revision. This new revision has been delayed many times, but will hopefully be ready for BETA this weekend.

                  Best regards,
                  Alexander

              • #16661
                Keith Hudson
                Participant

                  Desired enhancement: Easy copying of New form config to Edit form, or vice versa.
                  When I am building a complex form, I usually work on just one version of the form (for instance, the EditForm), and when I reach a point where the form is fairly useable, I will clone the EditForm to create the NewForm.

                  When I need to make changes later (especially if I have written custom Javascript that will provide extra functionality on both the New form and Edit form) I will make the changes in the Edit form, then delete the New form and recreate it so it has the same configuration. (OR, I will export the Edit form configuration and Import it into the New form.)

                  It would be great if we could have a button like “Copy Edit Form Config to New Form” to save a few steps when trying to keep the New and Edit forms synchronized.

                  Importance of this enhancement: very low

                  • #16671
                    Alexander Bautz
                    Keymaster

                      In the upcoming version I have added a new functionality to create restore points and to browse existing restore points. This feature is intended used to do exactly what you require. See attached image.

                      Best regards,
                      Alexander

                  • #17062
                    Konrad Kołodziejak
                    Participant

                      It would be great to have the option to specify the scope of search within the lookup list/library for vLookup functionality.

                      Currently the query created has RecursiveAll scope. Since there is an option ‘Add new items to this folder (Document libraries only)’, it would be really good to have an option to either search for items in all folders or specify particular folder.
                      This would help resolve issues with libraries having over 5000 items on SharePoint Online.
                      Let me know if you need any help with that. I am a SharePoint developer myself and be glad to contribute.

                      • #17164
                        Alexander Bautz
                        Keymaster

                          Thanks for the feedback. I’ll see what I can do about adding an option to specify the folder to search in for vLookup.

                          The current code base for vLookup is not fully optimized for SP 2013+, and I have plans to completely rewrite vLookup and make it an integrated part of DFFS. I’ll keep this in mind for the next version.

                          PS: I appreciate any feedback you have, so please post your suggestions here, or email them to me.

                          Best regards,
                          Alexander

                      • #17066
                        Konrad Kołodziejak
                        Participant

                          It would be great, if the minified version of scripts from plugins folder were loaded.
                          It would speed up the load time of assets and therefore shorten the time of overlay being displayed.
                          There could be a setting (debug mode) that would make the unminified plugins load instead of minified ones.

                          • #17166
                            Alexander Bautz
                            Keymaster

                              I have minified vLookup as this is the biggest files, but I’ll try to get all files minified for the next version.

                              Alexander

                          • #17351
                            Andreas Blüher
                            Participant

                              I know responsiveness is something you already looked into and thought about. What are your thoughts on CSS Grids? I only recently started using them, but I really like them and from my imagination they could be an option for DFFS too.

                              • #18885
                                Alexander Bautz
                                Keymaster

                                  Hi Andreas,
                                  Sorry for not replying earlier. I cannot use this approach in the current DFFS version because of how the original form is manipulated, but have plans for responsiveness in the next major release. Unfortunately I’m so busy supporting and maintaining my solutions and haven’t been able to get the momentum I hoped on the new version.

                                  Alexander

                              • #18880
                                Ivan Wilson
                                Participant

                                  Would it be possible to add functionality to support branching of DFFS? There are deployments where it is not practical to have dev/test/prod environments. We have to develop new functionality in production.

                                  It would be great if we could “branch” the dffs configuration, make changes, test it, then publish it as the production version. We could use a query string or cookie to indicate whether to use the prod or dev branch when accessing forms or configuring.

                                  The “enhanced with DFFS” tag could be updated to show which branch you are using and allow you to select a different branch.

                                  To get extra fancy, this branching may be done at a view, list, web or site collection level. You could also include special branch tags with include files if you want to make them branch specific.

                                  Obviously, any list configuration changes would affect all branches.

                                  • This reply was modified 6 years, 11 months ago by Ivan Wilson.
                                  • #18887
                                    Alexander Bautz
                                    Keymaster

                                      Hi Ivan,
                                      This is a good idea, and I have actually already planned to include more or less what you ask for. I haven’t finished it yet, but will try to get it out soon.

                                      Alexander

                                  • #19285
                                    Brett
                                    Participant

                                      Hi Alexander,

                                      If possible, I have been asked if once the form is Saved either in the ribbon or via button at the bottom, that the user be returned to a specific URL, like a homepage or thank-you page for example.
                                      Is there there a script that I can add to to the EditForm.aspx page?
                                      Perhaps this can be added in a future release in the Misc Tab?

                                      Thanks.

                                      • #19312
                                        Alexander Bautz
                                        Keymaster

                                          Hi Brett,
                                          You can use this code in your custom js:

                                          spjs.dffs.redirect("http://Your_redirect_url",false);

                                          The redirect will be performed when saving the form.

                                          Alexander

                                        • #19318
                                          Brett
                                          Participant

                                            Hi Alexander,
                                            Thanks for replying but I get an error in Custom JS textarea.
                                            Error: 80020101
                                            I’ve tried in both Edit and Display Custom JS areas.
                                            I have version 4.373, should I upgrade to the latest DFFS?
                                            Thanks.

                                          • #19336
                                            Alexander Bautz
                                            Keymaster

                                              I’m not 100% sure which version I added this function in. When in a form with DFFS, try bringing up the dev console by hitting F12 > Console and type in this:

                                              spjs.dffs.redirect

                                              If the output reads “undefined” you must update DFFS to the latest version.

                                              Alexander

                                            • #19339
                                              Brett
                                              Participant

                                                Thanks Alexander,
                                                I have upgraded to the latest DFFs and the redirect is now working.
                                                Many thanks.

                                            • #19287
                                              Phil Grant
                                              Participant

                                                Hi Alexander,
                                                Would it be possible to have the prev/next tab buttons at the top of the form, or both top and bottom maybe?

                                                Regards,
                                                Phil

                                                • #19314
                                                  Alexander Bautz
                                                  Keymaster

                                                    The easiest way to achieve this is to add this snippet to your custom js. You don’t need to use the Misc settings if you only want the buttons in the top.

                                                    var b = [];
                                                    b.push("<div style='padding:2px;text-align:right;border-bottom: 1px #808080 solid;'>");
                                                    b.push("<input class='ms-ButtonHeightWidth' type='button' value='Previous tab' onclick='spjs.dffs.navTab(0);'>");
                                                    b.push("<input class='ms-ButtonHeightWidth' type='button' value='Next tab' onclick='spjs.dffs.navTab(1);'>");
                                                    b.push("</div>");
                                                    jQuery(".dffsTabRow").after(b.join(""));

                                                    Alexander

                                                • #19331
                                                  Phil Grant
                                                  Participant

                                                    Thanks, it worked a treat 🙂

                                                  • #19472
                                                    Phil Grant
                                                    Participant

                                                      It would be nice to be able apply the configuration to the other two forms with one click of a button if possible.

                                                      Cheers,
                                                      Phil

                                                      • #19553
                                                        Alexander Bautz
                                                        Keymaster

                                                          I’ll see what I can do about a button to push it to the other forms, but you can use this method to share the same config for all forms in a list – just create an unique ID in the “dffs_formIdOverride” variable and insert this snippet in a script editor in all three forms.

                                                          Alexander

                                                      • #19550
                                                        Keith Hudson
                                                        Participant

                                                          It would be nice if the txt file at the root of the DFFS folder that shows the release date could also contain the version numbers of each of the component files. Right now, they only way I know to check the version numbers of a release is to install it and open it, or perhaps hunt through the Change Log on the spjsblog.com site.

                                                          For example, the contents of the file v2017-07-31.txt could read:

                                                          This file is used to quickly see the version date and changed files.
                                                          Changed files in this release:
                                                          ——————————-
                                                          /DFFS/js/DFFS_backend.min.js (v4.4.3.7)
                                                          /DFFS/js/DFFS_fontend.min.js (v4.4.3.7)
                                                          /DFFS/js/DFFS_backend.css (v4.36)
                                                          /DFFS/css/DFFS_frontend.css (v4.36)
                                                          /DFFS/plugins/SPJS-ac.js (v1.6.11)
                                                          /DFFS/plugins/SPJS-casc.js (v3.7.9)
                                                          /DFFS/loader/DFFS_loader.html (v?????)

                                                          Files not changed in this release:
                                                          ———————————
                                                          /DFFS/plugins/jquery.min.js (v1.12.4)
                                                          /DFFS/plugins/SPJS-vlookup_backend.js (v2.2.98)
                                                          /DFFS/plugins/SPJS-utility (v1.307)
                                                          etc.

                                                          • #19555
                                                            Alexander Bautz
                                                            Keymaster

                                                              Good idea – I’ll do that in the next release.

                                                              Alexander

                                                          • #20078
                                                            Andreas Blüher
                                                            Participant

                                                              Hello Alexander,

                                                              I’m wondering if it’s possible to have a single column being displayed more than one time in the same tab? Currently we’re doing this via custom code, but it’s not that easy.

                                                            • #20098
                                                              Alexander Bautz
                                                              Keymaster

                                                                Sorry, but you cannot have the same field multiple times in the same tab – different tabs is not problem though.

                                                                Alexander

                                                                • #20349
                                                                  Andreas Blüher
                                                                  Participant

                                                                    Thanks for your reply. Would it change anything if the 2. appearance would be read only by default?

                                                                • #20364
                                                                  Alexander Bautz
                                                                  Keymaster

                                                                    You can use this snippet in a HTML section to show the value from another field in the form (please note that it will not work in older versions):

                                                                    Field value is: {{FieldInternalName_Of_Your_Field}}

                                                                    Alexander

                                                                  • #20632
                                                                    Andreas Blüher
                                                                    Participant

                                                                      Have you thought about some kind of “light configuration” option? DFFS backend can be pretty overwhelming. I would like to have some special users which are allowed to add/remove fields, but to do nothing more. Is something like this possible?

                                                                    • #20649
                                                                      Alexander Bautz
                                                                      Keymaster

                                                                        This is currently not possible, but I’ll make a not of your request and see if I can add support for something like this in a future version.

                                                                        Best regards,
                                                                        Alexander

                                                                      • #20974
                                                                        Ross
                                                                        Participant

                                                                          Hi Alexander,

                                                                          Would it be possible to have a tab option to set all fields read-only on the tab?

                                                                          I know you can set separate rules by tab index but it does require the additional maintenance when columns are added to the tab or deleted from the list.

                                                                          Clients have requested this (not too sure on the use cases for it).

                                                                          • #20987
                                                                            Alexander Bautz
                                                                            Keymaster

                                                                              Hi,
                                                                              You can do this now by using a little Custom JS. Add this snippet to your Custom JS and call it from the “Click function name” in your tab:

                                                                              function readOnlyAllFieldsInTab(){
                                                                              	var arrToSetReadonly = [];
                                                                                  jQuery.each(spjs.dffs.data.tabConfigObj[spjs.dffs.data.selectedTab].fields,function(i,fin){
                                                                                      if(spjs.dffs.fieldData[fin] !== undefined){
                                                                                          arrToSetReadonly.push(fin);
                                                                                      }
                                                                                  });
                                                                                  spjs.dffs.doReadOnly(arrToSetReadonly);
                                                                              }

                                                                              Please note that the fields will stay read-only when you change tabs – you would have to set the fields as editable again in the other tabs.

                                                                              Alexander

                                                                            • #21008
                                                                              Ross
                                                                              Participant

                                                                                Perfect.

                                                                                Thanks for the quick response.

                                                                            • #21110
                                                                              William Summers
                                                                              Participant

                                                                                it would be really nice to be able to copy entire sections. Example would be a check box that you can copy the heading, fields under it because you want to move the entire section up or down the form or maybe even move it to the edit form from new.

                                                                                Cheers

                                                                                • #21122
                                                                                  Alexander Bautz
                                                                                  Keymaster

                                                                                    This is a good idea, and it is already on my list of things to add to a future version.

                                                                                    Alexander

                                                                                • #21182
                                                                                  Ross
                                                                                  Participant

                                                                                    Hi Alex,

                                                                                    There is probably already an easy way to do this but it would be nice to have an easy way to target the DFFS Print page for CSS changes.

                                                                                    Would you be able to include a class or id in the following?

                                                                                    
                                                                                    
                                                                                    spjs.dffs.printCurrentTab  = function() {
                                                                                      // ... Your print code
                                                                                    
                                                                                      // Include class or id to allow custom CSS to target printing and not display form
                                                                                      b.push("<table style='width:100%' class='dffs-print'>");
                                                                                    
                                                                                      // Continue print code
                                                                                    }

                                                                                    As always, thanks for your time!

                                                                                    • This reply was modified 6 years, 5 months ago by Ross.
                                                                                    • #21617
                                                                                      Alexander Bautz
                                                                                      Keymaster

                                                                                        Sorry for the late reply. I’ll add this to the next release, but in the meantime you can (if you haven’t already done so) override the function by adding this to your custom js:

                                                                                        spjs.dffs.printCurrentTab = function () {
                                                                                            if (spjs.dffs.data.selectedTab === "") {
                                                                                                return;
                                                                                            }
                                                                                            var b = [], tFields = spjs.dffs.data.tabConfigObj[spjs.dffs.data.selectedTab].fields, sbsTracker = {}, sbsID, pHead, pFoot, dffs_print;
                                                                                            b.push("<style type='text/css'>");
                                                                                            b.push(".ms-hide{display:none!important;}");
                                                                                            b.push(".dffs_noPrint{display:none!important;}");
                                                                                            b.push(".ms-spimn-img{display:none!important;}");
                                                                                            b.push("table.ms-formtable tr > td.ms-formlabel{width:50%;}");
                                                                                            b.push("td.ms-formlabel h3{font-size:13px;margin:0px;padding:0px 3px 0px 3px;}");
                                                                                            b.push("td.ms-formbody{width:60%;font-size:12px;padding:0px 3px 0px 3px;}");
                                                                                            b.push(".vLookupGroupHeader{width:100%;font-size:12px;cursor:pointer;background-color:#ACCBE0;border-top:1px #818181 solid;border-bottom:1px #818181 solid;margin:1px;padding:1px 3px 1px 3px;white-space:nowrap;}");
                                                                                            b.push(".childTableHeader{font-weight:bold;color:#3f4746;padding:1px 6px 1px 1px;cursor:default;border-bottom:1px #adb3c3 solid;}");
                                                                                            b.push(".childTableCell{font-weight:normal;padding:1px 5px 1px 2px;}");
                                                                                            b.push(".vLookupProgressBarOuter{background-color:#ffffff;border:1px #818181 solid;text-align:left;white-space:nowrap;overflow:hidden;}");
                                                                                            b.push(".vLookupProgressBarInner{background-color:#8ABC8B;border-right:1px #818181 solid;}");
                                                                                            b.push(".vLookupTotals{border-top:1px silver solid;border-bottom:3px silver double;padding:3px;cursor:default;text-align:right;}");
                                                                                            b.push(".spjshidden{display:none !important;}");
                                                                                            b.push(".tabH1{font-size:25px;color:#3f4746;padding:3px 0px 3px 0px;}");
                                                                                            b.push(".tabH2{font-size:20px;color:#3f4746;padding:3px 0px 3px 0px;}");
                                                                                            b.push(".childTableHeader{font-weight:bold;color:#3f4746;padding:1px 6px 1px 1px;cursor:default;border-bottom:1px #adb3c3 solid;}");
                                                                                            b.push(".customTooltip{display:none!important;}");
                                                                                            b.push("a{text-decoration:none;}");
                                                                                            b.push("#idAttachmentsTable .ms-vb{width:100%!important;}");
                                                                                            b.push(unescape(spjs.dffs.data.dffsDataObj.customCSS));
                                                                                            b.push(spjs.dffs.data.fieldCSS);
                                                                                            b.push("</style>");
                                                                                            if (spjs.dffs.data.dffsDataObj.tabs.printHeader !== "") {
                                                                                                pHead = spjs.dffs.buildValStr(unescape(spjs.dffs.data.dffsDataObj.tabs.printHeader));
                                                                                                pHead = spjs.dffs.translateStringWithJSON(pHead);
                                                                                                b.push(pHead);
                                                                                            }
                                                                                            b.push("<table style='width:100%' class='dffs-print'>");
                                                                                            if (tFields.length === 0) {
                                                                                                tFields = [];
                                                                                                jQspjs.each(spjs.dffs.fieldData, function (fin, o) {
                                                                                                    tFields.push(fin);
                                                                                                });
                                                                                            }
                                                                                            jQspjs.each(tFields, function (i, fin) {
                                                                                                var f = null;
                                                                                                if (jQspjs("#" + fin).length > 0 && (spjs.dffs.fieldtype[fin] === "dffs_heading" || spjs.dffs.fieldtype[fin] === "dffs_html" || spjs.dffs.fieldtype[fin] === "dffs_row")) {
                                                                                                    f = jQspjs("#" + fin);
                                                                                                    if (f.length > 0) {
                                                                                                        b.push(f[0].outerHTML);
                                                                                                    }
                                                                                                } else {
                                                                                                    f = jQspjs("#dffs_" + fin);
                                                                                                    if (f.length === 0) {
                                                                                                        if (fin === "Attachments") {
                                                                                                            f = jQspjs("#idAttachmentsTable");
                                                                                                        } else {
                                                                                                            return;
                                                                                                        }
                                                                                                    }
                                                                                                    if (jQspjs(f).parents("tr.sbs_OuterTR").length > 0) {
                                                                                                        sbsID = jQspjs(f).parents("tr.sbs_OuterTR:first").attr("id");
                                                                                                        if (sbsTracker[sbsID] === undefined) {
                                                                                                            sbsTracker[sbsID] = true;
                                                                                                            b.push(jQspjs(f).parents("tr.sbs_OuterTR")[0].outerHTML);
                                                                                                        }
                                                                                                    } else {
                                                                                                        if (f[0].tagName.toLowerCase() === "table") {
                                                                                                            b.push("<tr><td colspan='99'>" + f[0].outerHTML + "</td></tr>");
                                                                                                        } else {
                                                                                                            b.push(f[0].outerHTML);
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            });
                                                                                            b.push("</table>");
                                                                                            if (spjs.dffs.data.dffsDataObj.tabs.printFooter !== "") {
                                                                                                pFoot = spjs.dffs.buildValStr(unescape(spjs.dffs.data.dffsDataObj.tabs.printFooter));
                                                                                                pFoot = spjs.dffs.translateStringWithJSON(pFoot);
                                                                                                b.push(pFoot);
                                                                                            }
                                                                                            dffs_print = window.open("", "DFFS_print", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=750, height=800, top=100, left=100");
                                                                                            dffs_print.document.title = "DFFS";
                                                                                            jQspjs(dffs_print.document.body).append("<div>" + b.join("") + "</div>");
                                                                                            setTimeout(function () {
                                                                                                dffs_print.print();
                                                                                                setTimeout(function () {
                                                                                                    dffs_print.close();
                                                                                                }, 500);
                                                                                            }, 500);
                                                                                        }

                                                                                        Alexander

                                                                                    • #21636
                                                                                      Keith Hudson
                                                                                      Participant

                                                                                        Easy way to copy a single rule (or selected rules) or a single tab (or selected tabs) from one config to another.

                                                                                        Alex, I’ve had some developers who have been working on some very complex forms ask me if there is a way to copy a single rule or a set of rules from one config to another (for instance, to copy a rule developed in the New form config and copy it into the Edit form config).

                                                                                        I have sometimes also wished there was an easy way to copy just one tab from the New config to the Edit config.

                                                                                        • #21666
                                                                                          Alexander Bautz
                                                                                          Keymaster

                                                                                            Hi,
                                                                                            I will include this in the next release.

                                                                                            Best regards,
                                                                                            Alexander

                                                                                        • #22025
                                                                                          Keith Hudson
                                                                                          Participant

                                                                                            Easy way to “pause” a splash (overlay) screen.
                                                                                            We have encountered a situation where we would like to be able to include simple instructions to our users on the overlay as the form is opening, and control how long the overlay shows. Could you add a setting for that?

                                                                                          • #22059
                                                                                            Alexander Bautz
                                                                                            Keymaster

                                                                                              Hi,
                                                                                              You can put this in the custom js:

                                                                                              var mustReadOverlayId = spjs.dffs.alert({
                                                                                              	"title":"Please read instructions (Closes after 10 seconds)",
                                                                                              	"msg":"Put the instructions here - you can use HTML code or plain text.",
                                                                                              	"noBtn":true
                                                                                              });
                                                                                              // Remove overlay after 10 seconds
                                                                                              setTimeout(function(){
                                                                                                  spjs.dffs.closeDlg(mustReadOverlayId );
                                                                                              },10000);

                                                                                              Alexander

                                                                                            • #22364
                                                                                              William Summers
                                                                                              Participant

                                                                                                Good day Alex, I don’t see this anywhere but it would be nice if we had an option for setting an entire tab index to read only based on a rule.
                                                                                                Cheers

                                                                                                • #22366
                                                                                                  William Summers
                                                                                                  Participant

                                                                                                    Now that I think about it if I had the code or function to hide a tab that would be awesome as well!

                                                                                                • #22368
                                                                                                  Keith Hudson
                                                                                                  Participant

                                                                                                    William, I just saw this about code to hide a tab. The id of the tab is “dffs_tab_5” where 5 is the tab index. So, you can just use $(‘#dffs_tab_5’).hide() to hide tab with index 5.

                                                                                                  • #23575
                                                                                                    Peter Giesselink
                                                                                                    Participant

                                                                                                      I currently exploring DFFS by using the Training application example from this site. An enhancement could be the procedure to install the DFFS_Email list.
                                                                                                      In order to get the full functionality I have to use SharePoint Designer to create the workflows in this list. But the policy of our organisation is: “Use of SharePoint Designer is not allowed and therefor disabled”. I make use of SharePoint 2013 server.
                                                                                                      I know that workflows can be created by using SharePoint 2013 Workflow Services JS API. See: https://www.codeproject.com/Articles/607127/Using-SharePoint-2013-Workflow-Services-JS-API
                                                                                                      Is this possible to implement?

                                                                                                    • #23600
                                                                                                      Alexander Bautz
                                                                                                      Keymaster

                                                                                                        Hi,
                                                                                                        I looked at the article you lined to – I have not tried this before, but from what I could find I will be a bit difficult to build the entire workflow with code. Are you not able to use the REST email option? (the default method if you do not check the Use custom list with workflow to send E-Mails checkbox)?

                                                                                                        Alexander

                                                                                                      • #23602
                                                                                                        Peter Giesselink
                                                                                                        Participant

                                                                                                          Sure, the REST email option works, but it is not possible to send the mail later.

                                                                                                        • #23717
                                                                                                          Peter Giesselink
                                                                                                          Participant

                                                                                                            Javascript based CAML query builder

                                                                                                            I’m working behind a firewall without the possibility to install tools as smartCAML for building and testing CAML queries.
                                                                                                            Use of SharePoint Developer and Visual Studio are not allowed for client side developments.
                                                                                                            The approach used by spjs opens the possibility to build client side applications as a CAML query builder.

                                                                                                          • #23727
                                                                                                            Alexander Bautz
                                                                                                            Keymaster

                                                                                                              Hi,
                                                                                                              I’m sure it can be done, but unfortunately I don’t have time to build something like this. You find resources online regarding CAML queries, and you can always post a question in the forum where you describe what your want the query to do, and I’ll try my best to help you.

                                                                                                              Alexander

                                                                                                            • #23826
                                                                                                              Peter Giesselink
                                                                                                              Participant

                                                                                                                In our SharePoint groeps we are using Active Directory groups for granting access to SharePoint sites, directories and mailboxes to persons working on certain functions in the organisation. When a person is added to such an AD (role) group he get in one step all neccesary access autorities without bothering to enter it in all the systems.

                                                                                                                In the rule section one can make a tab visible for a certain SharePoint group. But I found out that DFFS does not resolve the AD groups in these SharePoint groups.
                                                                                                                Adding a userprofile to the SharePoint group will do the job, but that involves a lot of maintenance and that is not what we realy want.
                                                                                                                Is it possible to resolve the membership through the AD group until a userlevel is reached?

                                                                                                                • #23835
                                                                                                                  Alexander Bautz
                                                                                                                  Keymaster

                                                                                                                    Hi,
                                                                                                                    Thanks for the “beer”!

                                                                                                                    Unfortunately JavaScript cannot access AD to view members directly, but I have described a workaround that you might be able to use here: https://spjsblog.com/2016/01/10/ad-group-in-sp-group-workaround-for-verifying-membership/

                                                                                                                    Alexander

                                                                                                                  • #23931
                                                                                                                    Peter Giesselink
                                                                                                                    Participant

                                                                                                                      Hi Alexander,

                                                                                                                      Thanks for the workaround.
                                                                                                                      Is it correct that this workaroud algorithm is not implemented behind the Tab instruction: “Which groups can see this tab?”. Because that was the mean reason I’ve made this suggestion..
                                                                                                                      And if not: is it possible to add?

                                                                                                                    • #23933
                                                                                                                      Alexander Bautz
                                                                                                                      Keymaster

                                                                                                                        Yes, you are right – this is not built into DFFS.

                                                                                                                        Alexander

                                                                                                                    • #24010
                                                                                                                      Keith Hudson
                                                                                                                      Participant

                                                                                                                        Using vLookup from the New from when no ID is needed.

                                                                                                                        Currently (release date 2019-01-12) in order to have the vLookup functionality operate on the New form, I must include the _vLookupID column on my parent list even if I am using a different field to identify the child records I want displayed. (I’ll give the use case below.)

                                                                                                                        My user asked how to create the equivalent of an Infopath Repeating section in DFFS. The example she gave me was based on the child records sharing the same AU (stands for ‘Accounting Unit’, similar to a GL code in an accounting system) as the parent records, which doesn’t rely on the ID of the parent record OR the ID of the child record, but I still had to add the _vLookupID column on my parent list for the vlookup config to work.

                                                                                                                        If it is easy to turn off that validation when someone is not using the ID column on the parent list to relate to records on the child list, it would make setting up the lists easier for my user’s use case.

                                                                                                                        USE CASE: One team supports many applications. All the applications supported by the team fall under the same AU (think GL code) as the team falls under. The purpose of the new system is to show which applications are supported by different teams (select Manager name and see all the applications the team supports.)

                                                                                                                        A table of some applications and the AU’s they fall under is already available so the child list could be pre-populated through a bulk load. When adding a new manager to the parent list on the new form, immediately all the applications supported by that manager would show up on the form. Apps supported by the manager’s team NOT already pre-poplulated would be added individually on the parent list new form. At no time would the ID of the parent record be needed to find the related records on the child list.

                                                                                                                        • #24027
                                                                                                                          Alexander Bautz
                                                                                                                          Keymaster

                                                                                                                            Hi,
                                                                                                                            I’ll remove the limitation that makes you have to add the _vLookupID column when using vLookup in NewForm in the next release because even though you must add the column, you don’t have to use it in the query – so this check is not necessary.

                                                                                                                            Here is a code snippet you can use to pull a user info (user list in SP) or user profile (user profile service) value from a people picker and use it to search a child list for matching records where the user info / profile property is found in a text field called AU.

                                                                                                                            Add this to your Custom JS:
                                                                                                                            Change Manager to match your people picker internal name, Department to match your user info / profile property and vLookupAU to match your vLookup column internal name. This snippet uses the user info list, but if you like to use the user profile just change the line starting with var ui = to the commented out line.

                                                                                                                            var vLookupSearchValue = "";
                                                                                                                            function refresh_vLookup(){
                                                                                                                                vLookupSearchValue = "";
                                                                                                                                var managerLoginName = spjs.utility.getFieldValue({"fin":"Manager","key":"loginname"});
                                                                                                                                if(managerLoginName.length > 0){
                                                                                                                                    jQuery("#dffs_vLookupAU").show();
                                                                                                                                    // Get from User info list
                                                                                                                                    var ui = spjs.utility.userInfo(managerLoginName[0]);
                                                                                                                                    // Get from user profile service
                                                                                                                                    // var ui = spjs.utility.userProfile(managerLoginName[0]);
                                                                                                                                    var key = ui.Department;
                                                                                                                                    if(key !== null && key !== undefined){
                                                                                                                                        vLookupSearchValue = key;
                                                                                                                                    }
                                                                                                                                    spjs.vLookup._init("vLookupAU",false,true);
                                                                                                                                }else{
                                                                                                                                    jQuery("#dffs_vLookupAU").hide();
                                                                                                                                }
                                                                                                                            }
                                                                                                                            // Call when form loads
                                                                                                                            function dffs_ready(){
                                                                                                                                // Timeout to ensure people picker is ready
                                                                                                                                setTimeout(function(){
                                                                                                                                    refresh_vLookup();
                                                                                                                                },1000);
                                                                                                                            }

                                                                                                                            Create a rule:
                                                                                                                            Create a rule that triggers on change on the Manager people picker and add refresh_vLookup to the Run these functions / trigger these rules field.

                                                                                                                            Change vLookup configuration:
                                                                                                                            Then you change your vLookup settings like the attached images.

                                                                                                                            Alexander

                                                                                                                        • #24178
                                                                                                                          Travis Goodman
                                                                                                                          Participant

                                                                                                                            I have an idea that I don’t think currently exists. Could it be possible to set a default Custom CSS for every form? Right now, I copy my CSS from every single form onto any new forms I create. I’d like to see a way that I can have a default CSS automatically applied to every instance of DFFS I have, and then I can do further Custom CSS for the specific list from within the backend.

                                                                                                                            • #24192
                                                                                                                              Keith Hudson
                                                                                                                              Participant

                                                                                                                                Travis, I think you could accomplish that with existing functionality quite easily by using the “Load these CSS files ” section in the Custom CSS settings page in the DFFS configuration for your forms. Save your custom css as a css file, store it in your SPJS library, and then just add the reference when you create a new form.

                                                                                                                                I *THINK* there is even a way to add it to the “Plugins” folder in the SPJS library so it is automatically included in every form. Check the DFFS manuals (Installation and User Guide) online.

                                                                                                                            • #24196
                                                                                                                              Alexander Bautz
                                                                                                                              Keymaster

                                                                                                                                Hi,
                                                                                                                                I guess the easiest would be to just add it to the DFFS_loader.html file as a normal link-tag. Just edit the file and add it to the top – here is an example:

                                                                                                                                <link rel="stylesheet" href="/sites/yoursite/SPJS/dffs/your_custom_file.css">

                                                                                                                                @Keith: Your are right that you could to this earlier by adding it to the “custom” folder in /SPJS/DFFS, but this was deprecated when I added the “Load these files” above Custom JS and Custom CSS.

                                                                                                                                Alexander

                                                                                                                              • #24712
                                                                                                                                William Summers
                                                                                                                                Participant

                                                                                                                                  good day. working with cascading using multi select I find something to be cumbersome. When you select an entry and use the autofill if only one option present, it doesn’t work. It simply adds the one value to the Available options and not into the selected options forcing you to select them and add them to the Selected options.

                                                                                                                                  It would be cool if I were able to select 2 or more options in the “Available Options” box and all entries in the second box just transferred to the “Selected options” box. This would allow me to hide the second field “Business Sponsor” in this case so the EU did not have to deal with it and I could still use the values in a workflow.

                                                                                                                                  attached in this example you can see I selected BI/Analytics & reporting as well as EF DATA CAPTURE

                                                                                                                                  in the Business sponsor box the corresponding entries, “bill and Lisa” are placed in the “Available Options” and not automatically into the “Selected options”. Hope I am making sense.

                                                                                                                                  Attachments:
                                                                                                                                • #24724
                                                                                                                                  Alexander Bautz
                                                                                                                                  Keymaster

                                                                                                                                    Hi,
                                                                                                                                    Which version of SPJS-Casc are you using? – I tested, and it does autofill in my test site. I did fix a bug related to this issue in v3.7.13 back in April 2018.

                                                                                                                                    Alexander

                                                                                                                                  • #24734
                                                                                                                                    William Summers
                                                                                                                                    Participant

                                                                                                                                      currently I am using Dynamic Forms for SharePoint DFFS Backend v4.4.3.10|CSS version: 4.37 / 4.37|spjs-utility version: 1.309

                                                                                                                                      Thanks!

                                                                                                                                    • #25626
                                                                                                                                      MikeS
                                                                                                                                      Participant

                                                                                                                                        Alexander,

                                                                                                                                        This is a follow-up to the “pause” splash screen query. I’d like to detect a NON-Firefox browser (Internet Explorer, Edge, Chrome) and show a message that states “Use Firefox for faster loadtimes”.

                                                                                                                                        How could I do a browser detection in your custom JS:

                                                                                                                                        var mustReadOverlayId = spjs.dffs.alert({
                                                                                                                                        	"title":"Please read instructions (Closes after 10 seconds)",
                                                                                                                                        	"msg":"Put the instructions here - you can use HTML code or plain text.",
                                                                                                                                        	"noBtn":true
                                                                                                                                        });
                                                                                                                                        // Remove overlay after 10 seconds
                                                                                                                                        setTimeout(function(){
                                                                                                                                            spjs.dffs.closeDlg(mustReadOverlayId );
                                                                                                                                        },10000);

                                                                                                                                        Thanks
                                                                                                                                        Mike

                                                                                                                                        • This reply was modified 5 years, 5 months ago by MikeS.
                                                                                                                                      • #25629
                                                                                                                                        Alexander Bautz
                                                                                                                                        Keymaster

                                                                                                                                          You can try something like this:

                                                                                                                                          if(navigator.userAgent.toLowerCase().indexOf("firefox") < 0){
                                                                                                                                              var mustReadOverlayId = spjs.dffs.alert({
                                                                                                                                                  "title":"Non Firefox browser detected!",
                                                                                                                                                  "msg":"Use Firefox for faster loadtimes",
                                                                                                                                                  "ok":function(){
                                                                                                                                          			// Close dlg
                                                                                                                                              	}
                                                                                                                                              });
                                                                                                                                              // Remove overlay after 10 seconds
                                                                                                                                              setTimeout(function(){
                                                                                                                                                  spjs.dffs.closeDlg(mustReadOverlayId );
                                                                                                                                              },10000);
                                                                                                                                          }

                                                                                                                                          Alexander

                                                                                                                                        • #25633
                                                                                                                                          MikeS
                                                                                                                                          Participant

                                                                                                                                            Thank you Alexander. It works exactly as needed.

                                                                                                                                            Mike

                                                                                                                                          • #25985
                                                                                                                                            Keith Hudson
                                                                                                                                            Participant

                                                                                                                                              Suggestion: Add one more instruction in the tooltip for the “Set Field Value” setting in a rule.

                                                                                                                                              I keep forgetting how to enter the current user’s email address (NOT a mail-to link) in a people field using the Set Field Value setting in a rule.

                                                                                                                                              It’s a bit confusing:1. {currentUserEmail} will insert a mail-to link. 2. {currentUser:EMail} will insert the actual email address, which is VERY helpful when trying to populate a people field.

                                                                                                                                              In the next release, could you add a note in the tooltip about using {currentUser:Email} to insert the user’s email address?

                                                                                                                                            • #26001
                                                                                                                                              Alexander Bautz
                                                                                                                                              Keymaster

                                                                                                                                                Thanks, I’ll give this as an example in the tooltip in the next version.

                                                                                                                                                Alexander

                                                                                                                                              • #26230
                                                                                                                                                Keith Hudson
                                                                                                                                                Participant

                                                                                                                                                  2 New Requests:
                                                                                                                                                  1. I often get requests to change the wording of the Save button to “Submit”. Can that be added as an option on the Tab configuration page?
                                                                                                                                                  2. I also get requests to hide the Cancel button. Can that be added as an option on the Tab configuration page?

                                                                                                                                                  • #26232
                                                                                                                                                    William Summers
                                                                                                                                                    Participant

                                                                                                                                                      this will do it for now

                                                                                                                                                      _spBodyOnLoadFunctionNames.push(“ChangeSPSavetoSubmit()”);
                                                                                                                                                      function ChangeSPSavetoSubmit()
                                                                                                                                                      {
                                                                                                                                                      var inputs = document.getElementsByTagName(“input”);

                                                                                                                                                      for(i = 0; i

                                                                                                                                                    • #26402
                                                                                                                                                      Alexander Bautz
                                                                                                                                                      Keymaster

                                                                                                                                                        I’ll add an option to hide the Cancel button in the tab configuration in the next release. Renaming the Save button at the bottom of the form can easily be done like this:

                                                                                                                                                        jQspjs("input[id$='SaveItem']").val("Submit");

                                                                                                                                                        If you want to rename the one in the ribbon you can use this:

                                                                                                                                                        jQspjs("#Ribbon\\.ListForm\\.Edit\\.Commit a:first span:last").text("Submit");

                                                                                                                                                        Alexander

                                                                                                                                                    • #26280
                                                                                                                                                      Keith Hudson
                                                                                                                                                      Participant

                                                                                                                                                        Please have readonly fields adopt the same background color as formfields, eg:
                                                                                                                                                        .dffs-readonly-inner{
                                                                                                                                                        background-color:#e3e0e0;
                                                                                                                                                        }

                                                                                                                                                      • #26299
                                                                                                                                                        Alexander Bautz
                                                                                                                                                        Keymaster

                                                                                                                                                          Hi,
                                                                                                                                                          Did you use the Form background color setting in the Misc tab and then set a field readonly? – I have fixed this and will release a new version soon.

                                                                                                                                                          Alexander

                                                                                                                                                        • #26314
                                                                                                                                                          Keith Hudson
                                                                                                                                                          Participant

                                                                                                                                                            If I recall correctly, in version 4.4.4.0, there are colors entered in the Form background color setting in the Misc tab by default when a new config is created. I actually like having the default colors there, but having readonly fields adopt the same background color as is set in the Form background color setting makes the form look much nicer than having the readonly fields end up with white backgrounds while the editable fields have shaded or colored backgrounds.

                                                                                                                                                          • #26346
                                                                                                                                                            Alexander Bautz
                                                                                                                                                            Keymaster

                                                                                                                                                              I don’t think there is a default background color set, but I have fixed it so any custom background color set in the Misc tab will be applied also to the readonly value.

                                                                                                                                                              Please note that you must remove any custom css or js used to modify the style for this to apply.

                                                                                                                                                              Alexander

                                                                                                                                                            • #26671
                                                                                                                                                              Travis Goodman
                                                                                                                                                              Participant

                                                                                                                                                                Hi Alexander, I’d like to see if an enhancement can be made for the “If user is in group with ID or name” and the alternative “If user is NOT”.

                                                                                                                                                                The enhancement would be for it to be able to recognize users who are in the group, but by way of being in an AD-Group that is in that SharePoint group. So the users profile isn’t directly added, they are just in the AD-Group.

                                                                                                                                                                I know you have a workaround for this that requires a custom JS function and a triggered rule from that function, but am wondering if since that was created in 2016 perhaps there has been some new way to get that to work from the already configured rule without having to go through all that setup.

                                                                                                                                                                Reason for the ask is that I use that rule quite often, and recently was able to automate my active directory groups for effortless permissions management. I only started using AD groups recently, and found out the hard way that it doesn’t work with the rule as it is now.

                                                                                                                                                              • #26708
                                                                                                                                                                Alexander Bautz
                                                                                                                                                                Keymaster

                                                                                                                                                                  Hi,
                                                                                                                                                                  Unfortunately there is still no way of accessing or expanding the AD-group from JavaScript to check for membership.

                                                                                                                                                                  I’ll see if I can build in the workaround method in these triggers so that it will do an additional check to see if the user can view membership in case he or she is not added directly to the group.

                                                                                                                                                                  Please note that this check will only work for non-admin users because admins can always view membership.

                                                                                                                                                                  Alexander

                                                                                                                                                                • #27288
                                                                                                                                                                  Tricia S.
                                                                                                                                                                  Participant

                                                                                                                                                                    Hi I would like to request that there be a way to add a Text field to be part of the SBS table and show up next to the form bodies.
                                                                                                                                                                    In my example I want the the true/false to appear next to the check box in my SBS.

                                                                                                                                                                    • #27305
                                                                                                                                                                      Alexander Bautz
                                                                                                                                                                      Keymaster

                                                                                                                                                                        Hi,
                                                                                                                                                                        I’m not 100% sure I understand, but you can use this line of code to add a label to a Boolean checkbox field:

                                                                                                                                                                        jQuery("#dffs_YOUR_FIELD_NAME input").after("<label>Add label text here</label>");

                                                                                                                                                                        Replace YOUR_FIELD_NAME with your actual field name.

                                                                                                                                                                        Alexander

                                                                                                                                                                    • #27486
                                                                                                                                                                      Wilson
                                                                                                                                                                      Participant

                                                                                                                                                                        Alex,
                                                                                                                                                                        If we leverage the “.after” approach, how can we remove this later in custom JS after a condition is satisfied?

                                                                                                                                                                        I insert like this

                                                                                                                                                                        jQuery("#sbs_Field_MyField").after("<td>"+html+"</td>");

                                                                                                                                                                        Thanks,
                                                                                                                                                                        Wilson

                                                                                                                                                                      • #27497
                                                                                                                                                                        Alexander Bautz
                                                                                                                                                                        Keymaster

                                                                                                                                                                          By adding an ID to the element you insert:

                                                                                                                                                                          jQuery("#sbs_Field_MyField").after("<td id='your_custom_id'>"+html+"</td>");

                                                                                                                                                                          Then use this to remove it:

                                                                                                                                                                          jQuery("#your_custom_id").remove();

                                                                                                                                                                          Alexander

                                                                                                                                                                        • #28557
                                                                                                                                                                          William Summers
                                                                                                                                                                          Participant

                                                                                                                                                                            If this has been suggested please ignore it.

                                                                                                                                                                            It would be nice to have the ability to change the field labels. Currently, I use css to hide the .ms-formlabel and then add a row above the field to rename it. I realize I could rename the field after creating an internal field name but sometimes end users want a full blow sentence as a field label. I do not like these customers.

                                                                                                                                                                            Second, it would be pretty cool to somehow add an “Else” statement in the rules. I understand I can create rules to have that affect but when I get upwards of 40-50 rules, having to write another rule to deal with an “else” statement can be tedious. An example might be something like below.

                                                                                                                                                                            If field 1 is equal to “banana” then set field 2 to “fruit” Else set field 2 to “vegetable”

                                                                                                                                                                            Currently to get that done I would need 2 rules but thinking that if the condition were false then at the bottom of the rule would be an else statement.

                                                                                                                                                                            Cheers!

                                                                                                                                                                          • #28559
                                                                                                                                                                            Alexander Bautz
                                                                                                                                                                            Keymaster

                                                                                                                                                                              I have added a function you can to rename the fields back in October 2019 (v4.4.4.13) – you can use it like this:

                                                                                                                                                                              spjs.dffs.setFieldLabel({
                                                                                                                                                                              "fin": "Title",
                                                                                                                                                                              "label": "Title new label",
                                                                                                                                                                              "css": {"color":"green", "font-size": "1.5em"}
                                                                                                                                                                              });

                                                                                                                                                                              You can add functions to your Custom JS and call them from rules to set the field labels.

                                                                                                                                                                              Adding an else-section to the rules sounds like a good idea. At the moment it’s the “reversing” of the rule that handles the else, but having full control of the else-behavior is of course better. I’ll look into adding it in a future release.

                                                                                                                                                                              Alexander

                                                                                                                                                                              • #31375
                                                                                                                                                                                Dan Gotter
                                                                                                                                                                                Participant

                                                                                                                                                                                  Hello,
                                                                                                                                                                                  I am trying to use the function setFieldLable to rename some fields. The names created on the list are more system formatted with underscores and vowels missing. I’ve loaded the latest version 4.4.5.5 and I added the custom js you have above:
                                                                                                                                                                                  spjs.dffs.setFieldLabel({
                                                                                                                                                                                  “fin”: “Title”,
                                                                                                                                                                                  “label”: “Title new label”,
                                                                                                                                                                                  “css”: {“color”:”green”, “font-size”: “1.5em”}
                                                                                                                                                                                  });

                                                                                                                                                                                  When I try to load the page I get an error message stating I need to add the site name to DFFS_frontend_CEWP.html file which I have done.
                                                                                                                                                                                  var spjs_path = “/sites/spfyxkqr/SPJS/DFFS”;

                                                                                                                                                                                  I still get the error message and the form fails to load.
                                                                                                                                                                                  Is there something I am missing to get the custom js to load and run?

                                                                                                                                                                                  Thank you for all your work on this tool.
                                                                                                                                                                                  Dan

                                                                                                                                                                                • #31392
                                                                                                                                                                                  Alexander Bautz
                                                                                                                                                                                  Keymaster

                                                                                                                                                                                    Hi,
                                                                                                                                                                                    I cannot see why adding the spjs.dffs.setFieldLabel function to the form should give any kind of errors.

                                                                                                                                                                                    What version of SharePoint are you running, and which browser are you using?

                                                                                                                                                                                    Alexander

                                                                                                                                                                                • #28930
                                                                                                                                                                                  Eric Dickerson
                                                                                                                                                                                  Participant

                                                                                                                                                                                    This thread is great… it would be nice if the enhancements that have been made were deleted from this thread so one could look through the suggestions and not submit something twice… OR one could “second” a request that they agreed with.

                                                                                                                                                                                    I have a recurring issue that may be an enhancement… “Field X” is set by a rule to be read-only… “Field X” is then changed / populated by a rule… Other rules using “Field X is Changed…” or “Field X is change from initial value” do not trigger since the field itself was not touched on the form. It would be nice if the property “On field Change” looked at the content of that field changing, rather than that field being edited by the user interface.

                                                                                                                                                                                    ( I may have this all wrong… or maybe there is some other work around)

                                                                                                                                                                                  • #28941
                                                                                                                                                                                    Alexander Bautz
                                                                                                                                                                                    Keymaster

                                                                                                                                                                                      I agree, but I’m not sure I’ll be able to update this thread when I add new features – there is not always exact match with the request and what is eventually added. I do try to reply to the questions and indicate whether or not this will be added.

                                                                                                                                                                                      As for your request: I need to know what kind of field(s) you are experiencing this issue with so I can test it.

                                                                                                                                                                                      Alexander

                                                                                                                                                                                    • #29796
                                                                                                                                                                                      Vidya
                                                                                                                                                                                      Participant

                                                                                                                                                                                        Hi Alex,

                                                                                                                                                                                        I have a form , on click of a button it calls an API.
                                                                                                                                                                                        The response value from API needs to be set into a hidden field on the form which needs to be saved to my custom list data. I am calling the save after calling the API.

                                                                                                                                                                                        Attached is the customJS file. I need help in reading the return value from API call and saving it to the list.

                                                                                                                                                                                        Can you help?

                                                                                                                                                                                        Thanks,
                                                                                                                                                                                        Vidya

                                                                                                                                                                                        Attachments:
                                                                                                                                                                                        • #29807
                                                                                                                                                                                          Alexander Bautz
                                                                                                                                                                                          Keymaster

                                                                                                                                                                                            You have set it up wrong – your CallWFAPI is asynchronous and your “Save the form” line in the code runs before CallWFAPI has finished. Also, you cannot use “return” in an asynchronous function – to do that you would have to use a deferred promise.

                                                                                                                                                                                            I have changed the order of things a bit here for it to work:

                                                                                                                                                                                            function SaveAsDraft() {
                                                                                                                                                                                                alert("Inside SaveAsDraft");
                                                                                                                                                                                                //Update Approval Status
                                                                                                                                                                                                setFieldValue("Approval_x0020_Status", "Pending Submission");
                                                                                                                                                                                                //Call the workflow and save the item
                                                                                                                                                                                                CallWFAPI_ONDraft();
                                                                                                                                                                                            }
                                                                                                                                                                                            
                                                                                                                                                                                            function CallWFAPI_ONDraft() {
                                                                                                                                                                                                var auth = btoa('uid:pwd');
                                                                                                                                                                                                $.ajax({
                                                                                                                                                                                                    type: 'GET',
                                                                                                                                                                                                    url: 'my service url goes here',
                                                                                                                                                                                                    headers: {
                                                                                                                                                                                                        "Authorization": "Basic " + auth
                                                                                                                                                                                                    },
                                                                                                                                                                                                    success: function (data) {
                                                                                                                                                                                                        console.log(data);
                                                                                                                                                                                                        setFieldValue("WF_ID", data.id);
                                                                                                                                                                                                        alert("Get Field Value WF_ID" + getFieldValue("WF_ID"));
                                                                                                                                                                                                        //Save the form
                                                                                                                                                                                                        $("input[id$='diidIOSaveItem']").trigger("click");
                                                                                                                                                                                                    }
                                                                                                                                                                                                });
                                                                                                                                                                                            }

                                                                                                                                                                                            I still don’t understand what you are doing here exactly – is the WF you call actually changing the current list item? – if so, you will get a save conflict with this code and must insert a delay in your WF so it doesn’t trigger while you are saving.

                                                                                                                                                                                            PS: Next time you can create a new topic for your questions – this is not really an enhancement suggestion for DFFS.

                                                                                                                                                                                            Alexander

                                                                                                                                                                                        • #31529
                                                                                                                                                                                          Halim Lahoud
                                                                                                                                                                                          Participant

                                                                                                                                                                                            Hello

                                                                                                                                                                                            i usualy install dffs by uploading the installer in the app catalogue and then the app will appear in the “add an app” in sharepoint and i install it,
                                                                                                                                                                                            well i want to install in on a new site collection and the app dont show in “add an app” and i dont have the ContentEditorWebPart in my site so i cant use the way described in the installation manual any other way to install DFFS or do you know why the app dont show in the “add an app”

                                                                                                                                                                                            Thank you
                                                                                                                                                                                            Halim Lahoud

                                                                                                                                                                                          • #32434
                                                                                                                                                                                            Keith Hudson
                                                                                                                                                                                            Participant

                                                                                                                                                                                              William Summers recently had a project where he needed to put several dozen fields on a DFFS tab, and his users wanted a horizontal rule after every field. The following two suggestions came out of that experience.
                                                                                                                                                                                              SUGGESTION 1: Add space at bottom of the tab configuration pane so multiple fields can be added at once without having to scroll after each field is added. (William was able to accomplish this by adding the following at the end of the DFFS_backend.css file:
                                                                                                                                                                                              div.sectionWrapInner
                                                                                                                                                                                              {
                                                                                                                                                                                              padding-bottom:150px !important;
                                                                                                                                                                                              }

                                                                                                                                                                                              SUGGESTION 2: Make it possible to copy and paste a single Header, HTML section, or table row, either to paste it into the same tab, or into another tab.

                                                                                                                                                                                              • #32445
                                                                                                                                                                                                Alexander Bautz
                                                                                                                                                                                                Keymaster

                                                                                                                                                                                                  Hi,
                                                                                                                                                                                                  I’m not sure I understand what you mean by “without heaving to scroll” – maybe you are note aware that you can click the + to the left of the line you see when you hover over a field in a tab config?

                                                                                                                                                                                                  To add a border at the bottom of each field you can add this to your Custom CSS:

                                                                                                                                                                                                  .ms-formtable > tbody > tr > .ms-formlabel, .ms-formtable > tbody > tr > .ms-formbody{
                                                                                                                                                                                                      border-bottom:2px silver solid;
                                                                                                                                                                                                  }

                                                                                                                                                                                                  PS: The reason for prefixing with .ms-formtable > tbody > tr > is to ensure it does not affect side-by-side configs.

                                                                                                                                                                                                  Alexander

                                                                                                                                                                                              • #32848
                                                                                                                                                                                                Amal Vellappillil
                                                                                                                                                                                                Participant

                                                                                                                                                                                                  Hi Alex,

                                                                                                                                                                                                  I have a suggestion/enhancement request. I noticed that it would be very helpful to have all the field names available as intellisense in Ace editor. So I added this to your “aceAutocomplete” function inside DFFS_backend js file.

                                                                                                                                                                                                  var fieldNamesCompleter = {
                                                                                                                                                                                                                      getCompletions: function(editor, session, pos, prefix, callback) {
                                                                                                                                                                                                                          var wordList = spjs.dffs.data.listFieldsArr.map((f) => f.fin + "|" + f.disp + "|" + f.type); 
                                                                                                                                                                                                                          callback(null, wordList.map((word) => {
                                                                                                                                                                                                                              var wordArr = word.split("|");
                                                                                                                                                                                                                              return {
                                                                                                                                                                                                                                  caption: wordArr[1] + " - " + wordArr[2],
                                                                                                                                                                                                                                  value: wordArr[0],
                                                                                                                                                                                                                                  meta: "listField"
                                                                                                                                                                                                                              };
                                                                                                                                                                                                                          }));
                                                                                                                                                                                                                  
                                                                                                                                                                                                                      }
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  a.completers.push(fieldNamesCompleter);

                                                                                                                                                                                                  This code was added inside the else block where you are setting enableBasicAutocompletion: true. You can use this as is or modify to your willing to adapt to your coding styles. I hope this gets added to the future versions of DFFS.

                                                                                                                                                                                                  Thank you,
                                                                                                                                                                                                  Amal Vellappillil

                                                                                                                                                                                                  • #32850
                                                                                                                                                                                                    Alexander Bautz
                                                                                                                                                                                                    Keymaster

                                                                                                                                                                                                      Thanks for the excellent suggestion! – I’ll add it to the next release.

                                                                                                                                                                                                      PS: To keep backwards compatibility with IE (yes, still in use unfortunately) I had to rewrite the => syntax.

                                                                                                                                                                                                      Best regards,
                                                                                                                                                                                                      Alexander

                                                                                                                                                                                                    • #32854
                                                                                                                                                                                                      Amal Vellappillil
                                                                                                                                                                                                      Participant

                                                                                                                                                                                                        Sounds good to me 🙂

                                                                                                                                                                                                    • #35837
                                                                                                                                                                                                      Jason Hilton
                                                                                                                                                                                                      Participant

                                                                                                                                                                                                        I noticed that outer tables and the like are not uniquely named across tabs. So if you use say the following css :

                                                                                                                                                                                                        #sbs_OuterTable_1 {
                                                                                                                                                                                                        width:500px;
                                                                                                                                                                                                        }

                                                                                                                                                                                                        To format a row of fields on tab A, it also affects the same row on tab B.

                                                                                                                                                                                                        Maybe appending a _{tab #} to the end of ID’s that are replicated across tabs is necessary. That way I can target each tabs layout individually without causing cross contamination of styles.

                                                                                                                                                                                                        • #35839
                                                                                                                                                                                                          Alexander Bautz
                                                                                                                                                                                                          Keymaster

                                                                                                                                                                                                            Hi,
                                                                                                                                                                                                            The “1” in sbs_OuterTable_1 is the side-by-side index you have specified in the tab. If you use a different / unique index for the same fields in each tab you can style them individually.

                                                                                                                                                                                                            Alexander

                                                                                                                                                                                                      Viewing 62 reply threads
                                                                                                                                                                                                      • You must be logged in to reply to this topic.