Forum Replies Created
-
AuthorPosts
-
Oh 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.
Got 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?
Let’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?
Yeah, 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!
Ah, 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 3 years, 6 months ago by
Jonathan Stamper.
Using 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 3 years, 6 months ago by
Jonathan Stamper.
That’s a good point. I ended up hosing it for now.
One-off question – does spjs.dffs.alert have a timeout feature? I was going to do an alert popup that would show up for about 3 seconds and then disappear.
That was it! Just needed some time before executing. I even included a 3rd option to catch the mouse up event on the spjs_acItem class to continue appending the field next to it as the user starts clicking items all in one go.
Though it’s a rough/ugly way of setting other fields using multi-select ac it works great!
Ah dang the mouse up is close but still returns the removed item using SetFieldValue. I tried “change” and that didn’t work either. I tried to create a rule but since my ac field is actually a multi-line plain text field I don’t think I can create a rule on that.
-
This reply was modified 3 years, 7 months ago by
Jonathan Stamper.
I like that! I appreciate it?
I figured it out…
- I had some old AC code in my Custom JS section of the child forms. I’m using external js files now, with the ac inside a function, so it was conflicting
- Once I removed the old Custom JS, the AC on the New child form worked correctly calling the ac function in vLookupPresetFromURLDone
- Finally, the edit form stopped working with AC until I called it in dffs_ready within an if statement using spjs.dffs.data.isEditForm
Glad I got that working as that was causing some headaches haha.
Oh, I think I see why, it’s based on when the child form loads. I’m using vLookupPresetFromURLDone(fin) but it’s almost like it needs to literally wait until everything has loaded to capture. I have it on dff_ready and that doesn’t seem to work either.
I’m not sure if there is another onLoad option.
My apologies, in the title it should have said “Only works on Edit form”
Ok, I’ll try that out. In terms of when/where the action would occur it would be after returning to the main form from child form and/or during dffs_ready and pre-save.
I’m doing light “data integrity” between what the requestor chooses in the main AC, and what is/isn’t available as a list item in a vLookup/child list. Only Admins can add to the vLookup/child list and I wanted to attempt to auto-update the AC values on the main form to reduce manual updating.
Right now, I have it set up where if a requestor adds items in the main AC field, when they save the request, the selections are then created as list items in the child list for additional usage and future reporting opportunities.
-
This reply was modified 3 years, 8 months ago by
Jonathan Stamper.
-
This reply was modified 3 years, 6 months ago by
-
AuthorPosts