Alexander Bautz

Forum Replies Created

Viewing 15 posts - 211 through 225 (of 4,705 total)
  • Author
    Posts
  • in reply to: Deploying package #37404
    Alexander Bautz
    Keymaster

      The configuration for Modern DFFS is stored in a list in each site. The list is hidden, but you can access it on this URL:

      /sites/your_site/lists/DFFSConfigurationList
      

      If you include this list (with contents) in your package, DFFS will load the config as soon as the Modern DFFS App is installed in the App Catalog.

      Alexander

      Alexander Bautz
      Keymaster

        Hi,
        I have confirmed the bug and started work on it during the weekend, but was not able to finish it. I hope to get a new version out later this week.

        Alexander

        in reply to: Bug found in 1.0.45 #37384
        Alexander Bautz
        Keymaster

          Thanks for the clarification. I have started work on it during the weekend, but found some other issues I need to figure out. I hope to get a new version out later this week.

          Alexander

          in reply to: Errors on list item creation or edit #37380
          Alexander Bautz
          Keymaster

            This error is the one fixed in v45 – it was introduced in v37.

            Alexander

            in reply to: Bulk adding rules? #37378
            Alexander Bautz
            Keymaster

              Add something like this to your custom js:

              var arrOfFields = ["Q1_x0020_Status", "Q2_x0020_Status"];
              
              arrOfFields.forEach(fin => {
                  jQuery("#dffs_" + fin + " select").on("change", function(){
                      triggerChangeChoiceFields();
                  });
              });
              
              function triggerChangeChoiceFields(){
                  var hasFail = false;
                  arrOfFields.forEach(fin => {
                      if(getFieldValue(fin) === "Fail"){
                          hasFail = true;
                      }
                  });
                  if(hasFail){
                      // Do your custom action here - for example call a rule that is set up with "Not trigger (must be triggered manually)"
                      spjs.dffs.triggerRule(["customTrigger"]);
                  }
              }
              

              This code triggers a rule called customTrigger – set up with the trigger “No trigger (must be triggered manually)”.

              Let me know how this works out.

              Alexander

              • This reply was modified 11 months, 3 weeks ago by Alexander Bautz. Reason: Fixed code snippet format
              in reply to: JS to hide unused banded rows #37377
              Alexander Bautz
              Keymaster

                If you use code to hide fields in a row with side-by-side fields there is unfortunately no built in functionality to hide the “outer” row when all fields in the row have been hidden by rules.

                The only way to do this is to use custom js – for example on an interval – to check if all fields have been hidden and then hide the outer row.

                Alexander

                in reply to: Bug found in 1.0.45 #37365
                Alexander Bautz
                Keymaster

                  Hi,
                  I need some clarifications: are you trying to copy from a multilookup field in the parent to a multilookup field in the child and only the first item is transferred, or are you trying to transfer values from multiple different lookup fields and only the value in the first field is transferred?

                  Alexander

                  Alexander Bautz
                  Keymaster

                    In DFFS this setting is found in the Misc tab > Multi lookup columns > Arrange multi lookup columns vertically.

                    Alexander

                    in reply to: Modern Page with list view #37349
                    Alexander Bautz
                    Keymaster

                      Hi,
                      I tested it and it seems to works as expected. Please note that the modern DFFS solution is a list view command set extension and only loads when the command bar is visible (edit > Show command bar).

                      Alexander

                      Alexander Bautz
                      Keymaster

                        I think there is a built in check in the browser that prevents the function to run in the form has not been modified – try changing at least one field and see if the code runs when you try to exit.

                        Alexander

                        Alexander Bautz
                        Keymaster

                          The code to tap into the PreSaveItem function worked in my test, but you must ensure you run the originalPreSaveItem and not use “return” in the code above the call to this function.

                          Alexander

                          Alexander Bautz
                          Keymaster

                            Sure, just add this to your custom js:

                            // Set this to false first
                            var hasSaved = false;
                            
                            window.addEventListener("beforeunload", (event) => {
                                if(!hasSaved){
                                  event.preventDefault();    
                                  event.returnValue = true;
                                }
                            });
                            

                            Now add this to the top of your dffs_PreSaveAction function:

                            // Set the variable to true to to disable the warning when the form is saved
                            hasSaved = true;
                            

                            Alexander

                            Alexander Bautz
                            Keymaster

                              The PreSaveAction function will never run if the form has empty fields, but you can tap into the PreSaveItem function like this to run your custom code:

                              var originalPreSaveItem = PreSaveItem;
                              PreSaveItem = function(){
                                  // run custom function here
                                  // trigger original PreSaveItem
                                  originalPreSaveItem();
                              }
                              

                              Alexander

                              in reply to: Check out functionality with workflow check #37336
                              Alexander Bautz
                              Keymaster

                                Thanks for the feedback – I’m glad you figured it out.

                                Alexander

                                in reply to: Check out functionality with workflow check #37334
                                Alexander Bautz
                                Keymaster

                                  Is the problem that you try to edit the item and get a save conflict because of the workflow updating the item after the user opened it for edit?

                                  If you are using a SharePoint Designer Workflow (not PowerAutomate FLOW) you can try the rule trigger “Workflow status” – read about it by clicking the orange question mark to the right of the trigger-select to open the contextual help.

                                  Set this thread for an example of a custom function you can have this rule trigger: https://spjsblog.com/forums/topic/check-out-feature-triggering-workflows/#post-26487

                                  Alexander

                                Viewing 15 posts - 211 through 225 (of 4,705 total)