Forum Replies Created
-
AuthorPosts
-
Jonathan StamperParticipant
Sorry! I probably should have posted this on the DFFS forum but:
spjs.dffs.hideFormMenu
Jonathan StamperParticipantThat is really cool! I didn’t know that existed. Fortunately, I’m not using any workflows at the moment but I’m sure I will have to transition to them in the future with SP Online. What sort of hinderances are you referring when using Flow?
Jonathan StamperParticipantAh, ok I’ll take a look into that thanks for letting me know.
Jonathan StamperParticipantThat was it. I needed to change the order of operations between the AC and the Create Copy. Big thanks!!!
Now I just need to put in a logic for the children and I should be good.
Jonathan StamperParticipantAh, I see I tried to include it in my dffs_ready() but that means I’d need to shut off all my rules and alerts to correctly do it. That is unless I shouldn’t do it in there.
Jonathan StamperParticipantOh, the order to which the AC is initiated to when the values are populated would cause that error I’m getting. Ok, I’ll check that out. Many thanks!
Jonathan StamperParticipantOops, that’s supposed to be a lower case v for the val variable.
Jonathan StamperParticipantI had a chance to try and invoke and I’m getting a “TypeError: Cannot read properties of undefined (reading ‘items’). I’m trying to load in 2 AC fields (one is a multi-field). The error occurs right after executing the spjs.ac.setFieldValue section below:
if(GetUrlKeyValue("CreateCopy") === "1"){ var str = sessionStorage.getItem("SaveAndCreateNewData"), data; if(str !== null){ data = JSON.parse(str); jQuery.each(data,function(fin,val){ If (fin===“field1” || fin===“field2”){ spjs.ac.setFieldValue(fin,Val); } else { setFieldValue(fin,val); } }); }
Jonathan StamperParticipantAh that’s right I forgot about the invoke functions available from the AC manuals and references. Much appreciated as always!
Jonathan StamperParticipantOh I get it! The if(GetURLKeyValue…) is outside a function because it’s like my last step for the new form to pick up and copy the data over on. That’s cool.
Is there a specific way I should render AC fields? It looks like they are coming in but not rendering exactly as they would if a user selects them in.
Jonathan StamperParticipantGot it so instead of using presave just trigger via a function that takes the session storage, opens new form and drops it all in there?
Jonathan StamperParticipantLet’s say I have an edit form of a completed item and I wanted to copy or duplicate that request on to a New Form. Would the same logic above work?
Jonathan StamperParticipantYeah, I just tested it and it worked very well. I ended up setting multiple {internalFieldName} parts, separated by comma, in the to and cc and it’s working well. Looks like I get to clean up my code a little ha-ha.
Thank you so much! As always! Pizza on me ha-ha!
Jonathan StamperParticipantAh, yep! The more I dove into it the more I was wondering that being the case also. I just put that in and will try that out. Much appreciated.
With that setup I described I wouldn’t be able to use drag and drop because I’m requiring a metadata selection on each attachment.
- This reply was modified 2 years, 6 months ago by Jonathan Stamper.
Jonathan StamperParticipantUsing the code above, on occasion it doesn’t rename the child vLookup folder and provides no errors in the log. I think it may have to do with either timing during submission and/or browser compatibility where some users still prefer IE…not sure why though…
Curious if you had any thoughts and/or other solutions? Also, based on background below, could drag and drop be used?
What I’m doing:
- On new form a user selects the attachments tab showing only attachment set up button.
- Clicking the button creates a “temp” folder using the vlookup ID (“:” converted to “_”) in the child doc library. 3 sub-folders are also created and one of the sub-folders is where the attachments go linking to parent. It’s always the same sub-folder.
- The vLookup table and attach file button appears the user can then attach their files (curious about drag and drop here) and they are also required to select from a drop down to add the attachment.
- When the user submits the new form, a programmatic id is created (not a fan of this but they want it). That id is then used to rename the folder on the doc lib.
I tried to create something to check for the renaming when saving in edit form and that’s when I noticed it not always renaming.
- This reply was modified 2 years, 6 months ago by Jonathan Stamper.
-
AuthorPosts