Alexander Bautz

Forum Replies Created

Viewing 15 posts - 196 through 210 (of 4,705 total)
  • Author
    Posts
  • Alexander Bautz
    Keymaster

      Yes

      Alexander Bautz
      Keymaster

        Did you use the dffs_fieldChanged function from the Custom JS example thread?

        You should be able to do it something like this:

        function dffs_fieldChanged(fin, new_value, previous_value) {
            switch (fin) {
                case "fieldA":
                    setFieldValue("fieldB", new_value.substring(0, 10)); // 10 first characters of fieldA is written to fieldB
                    break;
                case "fieldC":
                    setFieldValue("fieldD", new_value.substring(0, 10)); // 10 first characters of fieldA is written to fieldB
                    break;
            }
        }
        

        Alexander

        in reply to: Bug found in 1.0.46 #37448
        Alexander Bautz
        Keymaster

          Hi,
          I’ll have to test this and see if I can replicate it. Can you email me screenshots of the setup and the error so I can set up a similar test?

          Alexander

          in reply to: vLookup Document upload form #37447
          Alexander Bautz
          Keymaster

            I’m planning a new version hopefully over the weekend, but I’m not sure if I’ll be ale to get this one in that release – I’ll see what I can manage. If not, it should be fixed in a week or two.

            Lists already work as the form is the primary input so you fill in the form and save.

            Alexander

            in reply to: vLookup Document upload form #37441
            Alexander Bautz
            Keymaster

              This is not an option in the current version, but I’ll look at adding that functionality in a future version.

              Alexander

              in reply to: Form Loading problems in Modern DFFS #37439
              Alexander Bautz
              Keymaster

                I’m planning to release a new version during or over the upcoming weekend.

                Alexander

                in reply to: Form Loading problems in Modern DFFS #37437
                Alexander Bautz
                Keymaster

                  Thanks, I think this helped. I’ll include a fix in the next release.

                  Best regards,
                  Alexander

                  in reply to: Feature request for “Quick Save” on a “NEW” item #37436
                  Alexander Bautz
                  Keymaster

                    Good idea, I’ll look into it for the next version.

                    Alexander

                    in reply to: Not All Lists Visible #37429
                    Alexander Bautz
                    Keymaster

                      It must be a permissions problem. I’m actually not 100% sure, but you might have to be a site collection admin to be able to list all subsites.

                      What you can do if this is a problem is to install the Charts solution in the subsite your coworker is trying to access.

                      Alexander

                      in reply to: Classic dffs – block out dates on date field calendar #37423
                      Alexander Bautz
                      Keymaster

                        There is unfortunately no function to block the selection of the dates, but you can run a validation after the user has picked the date by adding some custom js and a rule.

                        Add this to your custom js:

                        function validateDateField() {
                            var dateFieldInternalName = "DateColumn1";
                            jQuery(".customDateValidation").remove();
                            var today = new Date();
                            var date = spjs.utility.getDateFieldAsDateObject(dateFieldInternalName);
                            var requiredDateOffset = 6;
                            var diffDays = (date - today) / (24*60*60*1000);
                            if (diffDays < requiredDateOffset) {
                                jQuery("#dffs_"+dateFieldInternalName+" td.ms-formbody").append("<div class='customDateValidation' style='color:red;'>The date must be atleast <strong>"+requiredDateOffset+"</strong> in the future.</div>");
                                jQuery("#dffs_"+dateFieldInternalName+" input").val("");
                            }
                        }
                        

                        Change “DateColumn1” to match your date field internal name.

                        Now add a rule that triggers on “is changed” on your date field and add the name of the function to the “Run these functions / evaluate these rules” field like this:

                        validateDateField
                        

                        When a selection is made in the field, this code checks if the value selected is 6 days in the future and shows a message and clears the value if it is not at least 6 days ahead.

                        Alexander

                        • This reply was modified 11 months ago by Alexander Bautz. Reason: Fixed code snippet format
                        in reply to: Feature request #37421
                        Alexander Bautz
                        Keymaster

                          I’ll fix this in the next version.

                          Alexander

                          in reply to: Feature request for “Quick Save” on a “NEW” item #37420
                          Alexander Bautz
                          Keymaster

                            NewForm and EditForm configurations are often different to let the first person use a simple form and then have a more complex form with more fields in editform.

                            I think the best solution would be to add an option to turn off quick save (I’ll look at adding that to the next version) so you can use the dffs_PostSaveAction custom js function to redirect to the EditForm configuration.

                            Alexander

                            in reply to: JS – how to refer to a field in the code #37411
                            Alexander Bautz
                            Keymaster

                              Hi,
                              If you look at this thread and find the Do something before the item is saved section you can just use getFieldValue(“Your_field_name”) to get the value to build your new variable with the changes, and setFieldValue(“Your_field_name”, your_variable); to write it back to the field.

                              Alexander

                              in reply to: Form Loading problems in Modern DFFS #37408
                              Alexander Bautz
                              Keymaster

                                I haven’t seen this error myself. It refers to the built in object _spPageContextInfo and it tries to read the pageListId from that object.

                                If you are able to recreate the issue it would help me to troubleshoot if you could bring up the developer tools and type this in the console and send me the output (expand the object) by clicking the triangle to the left of the output:

                                _spPageContextInfo
                                

                                Alexander

                                in reply to: SharePoint retirement of Add-Ins #37406
                                Alexander Bautz
                                Keymaster

                                  No worries, the Modern DFFS is a SharePoint framework app.

                                  Alexander

                                Viewing 15 posts - 196 through 210 (of 4,705 total)