Version History, Issues with Rich Text, and other notes

Home Forums Modern DFFS Version History, Issues with Rich Text, and other notes

Viewing 4 reply threads
  • Author
    Posts
    • #38259
      Travis Goodman
      Participant

        Hey Alex!

        Just loaded the latest version of DFFS. One thing that is needed, restore previous version from version history. When I look at the version history of an item, I like that I can see everything, but I don’t see the button to restore a previous version.

        For multiline rich text fields, when a picture is entered into the field, it doesn’t retain. I haven’t tested this in 0.72 yet, but every time I made a note and I wanted to include an image, the image would paste, but then when I save and go back in, it’s lost and gives the thumbnail of a broken image icon. Can you let me know if you have the same user experience?

        Is cascading dropdowns plugin coming soon? Something I have come across in classic DFFS and will want to have it in modern DFFS, sometimes in limited situations there will be no value for a cascading dropdown option in the middle of the cascading “tree”. What I’ve come up with is in CustomJS I’ll load dataSourceArray and call spjs.casc manually. I will then do an IF statement where IF [field] === null then set that value in the dataSourceArray to None. I’m doing this before I ever call spjs.casc so that when I call it, those fields have a value and my cascading dropdown doesn’t break. It happens sometimes in certain situations.

        Here’s one for example: I have a cascading dropdown of employees. I go Employee > Manager > Area Manager > Director. Sometimes there is no manager, so it may jump straight from Manager to Director. Regular cascading dropdowns would result in a break here, and no Director would ever get set. My method above replaces the null with the option of None, and that fixes it. Something to think about.

        I also know I owe you some additional information on previous posts, I will get that for you hopefully soon.

      • #38260
        Travis Goodman
        Participant

          Found another issue this morning. On vLookup build a table, I was just notified by a user in a timezone that is 1 hours behind my own (I’m in Central Time United States, they are in Mountain Time United States). I am bringing a date field into the table for the vLookup. For me, the dates look correct. For the coworker in the other time zone, the dates are off by -1. If that same user goes to the list referenced in the vLookup and looks at the date values in the list, the dates show correctly for them. The issue is exclusively in the vLookup table.

        • #38261
          Travis Goodman
          Participant

            So I found the underlying problem, and it’s daylight savings time. The way that date field is brought in, is not respecting daylight savings time.

          • #38265
            Travis Goodman
            Participant

              I solved for the timezone issue by adding a Customizer function to the field in the vlookup table.

              function vLookupDateFormat(item, field, config) {
              if (item[field.fin] !== null) {
              var d = new Date(item[field.fin]);
              return new Date(d.getTime() + 6 * 60 * 60 * 1000).toLocaleDateString(); //the + 6 (hours to add) * 60 * 60 * 1000 fixes an issue with the dates not displaying correctly for anyone not in Central Time due to DST. Note that this will change the timestamp, but I don’t care about the timestamp as I only show the date value.
              }
              }

              However, I recreated a previous issue I reported with vLookup in Modern DFFS I’d like you to look at.

              In the build table section, I had the customizer function before and I removed it. Saved the form and then looked at the item and it said “Customizer Function Not Found” but I had no value in the Customizer Function section for that field in the vLookup configuration. I couldn’t get that error to go away, so my only choice was to remove the field from the build table config and re-add it. When I did that, I saved the form, and the error went away. However, when I went back into the vLookup config, and I went to the “Add new item” section, all of the Prefill field values I had set completely changed. It was using the same fields from the Build the Table tab, and I don’t use any of those fields.

              Build table tab has:
              Title
              StartDate
              EndDate
              Status

              Add new item tab has:
              vLookupProjectID (single line of text) that I set to [[fieldValue:_DFFSID]]
              ProjectLookup (lookup column in child list) this I set to [[item:id]]

              When I removed StartDate and EndDate from Build table tab, and I readded them, I saved. Then I got a report of someone trying to add a new item where ProjectLookup and vLookupProjectID were not getting set automatically. So I go into the config and I see that the Add new item tab was completely changed. It showed the same fields as the Build Table tab. This has happened several times.

            • #38269
              Alexander Bautz
              Keymaster

                Restoring a previous version is not currently possible using client side code, but there is an option in the Misc tab to show a link to open the default version log functionality where you can restore a previous version.

                Pasting images is unfortunately not supported (as it is also not in standard SharePoint). The paste functionality is there by default in the browser, but when you paste in a rich text field, the image uses base64 formatting that SharePoint just removes when you save it. The only way to add images is to use the URL to an image in the add-image icon.

                I’ll look into adding support for automatically saving pasted images as attachments (or add them to siteassets) in a future version.

                Cascading dropdowns are already supported – look at the user manual for details.

                Regarding vLookup dates: Does the date show correctly in the child item if the user opens it up and not just looks at it in the vLookup table in the parent item?

                Regarding customizer function: I have fixed the bug where removing the customizer function shows the message “Customizer function not found” in the upcoming version.

                I’m unfortunately still not able to recreate the issue you describe with all viewFields from the Build the table shows in the Add new item tab. Are you maybe copying or cloning the vLookup config prior to this happening?

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