Forum Replies Created
-
AuthorPosts
-
Hey Thanks for the help, Alexander. I tried this, but it didn’t work.
For some context:
1 – the field that I’m trying to update is a multiline field
2 – I open the child newform from the parent editformDo any of these factors make a difference?
Works the same in both browsers and yes the folder was created successfully.
When it first happened a JavaScript error window appeared. I didn’t capture that message. I’ll replicate the issue and get the error message to you.Nice! That worked. Thanks. When I click the up arrow next to the folder, it brings up an upload screen. However, when I click the open folder a pop-up shows up real quick and then goes away. Do you know what that could be?
How would I write that line of code you suggested on the rules tab? Do I choose my field from the drop-down and write your suggestion in the value field?
So it looks like “EventCommandLookup” is working like normal. I actually had my value misspelled. But “EventOrgLookup” isn’t working.
good deal. Thanks!
Worked perfectly. Thanks.
I have four buttons for signature on my form.
Should I create 4 functions and apply to each button? Like this:function signDir(){ var user = spjs.utility.userInfo(_spPageContextInfo.userId); setFieldValue("DirectorSignature", user.Title + " " + new Date().toLocaleString(_spPageContextInfo.currentUICultureName)); }
function signG1(){ var user = spjs.utility.userInfo(_spPageContextInfo.userId); setFieldValue("G1_Signature", user.Title + " " + new Date().toLocaleString(_spPageContextInfo.currentUICultureName)); }
function signG8(){ var user = spjs.utility.userInfo(_spPageContextInfo.userId); setFieldValue("G8_Signature", user.Title + " " + new Date().toLocaleString(_spPageContextInfo.currentUICultureName)); }
function signCos(){ var user = spjs.utility.userInfo(_spPageContextInfo.userId); setFieldValue("CoS_Signature", user.Title + " " + new Date().toLocaleString(_spPageContextInfo.currentUICultureName)); }
Or is their a best practice to write all of this?
Hey Alex, is it possible to maybe make the signature a username and date/time?
Maybe like this” “Last Name, First Name – 1 OCT 2019 – 11:26 AM”.worked like a charm. thanks!
Thanks!
When I put this in the HTML:
`<button onclick=”signForm()”>Click to Sign</button>’And put this in the custom JS:
‘function signForm(){
var user = spjs.utility.userInfo(_spPageContextInfo.userId);
setFieldValue(“DirectorSignature”, user.Title);
}’It works, but then the screen refreshes and I lose the signature. How do I stop the refresh?
Good deal. I’ll give this a shot.
Hey, thanks Michael. I’m aware of the first option. It’s what I normally do. However, i was looking for something that had the same functionality as InfoPath. In InfoPath, you can name your field, but on the form canvas you can write whatever you want.
If those are my best options, I guess I’ll have to make them work. Thanks again!
Ok, so let me see if I got this correct (I’m terrible at JavaScript. Still trying to learn).
First, what I need to do is change this function name from “callMeFromChangeRule” to something like “updateChildrenEvents”.
Then, I need to add it to my customJS section on the parent Edit form.
Then, on the parent Edit form, I need to create a rule that calls “updateChildrenEvents”. If that’s correct, I actually have a few fields that match the children. The parent needs to update any of those same children fields when saved. Are there any examples of how to do this?I had this need as well. What I did was put this code on the Edit form of my Parent list in the customJs tab. Is that correct? My parent field is titled “canceled” (Boolean) and I need the child field “EventStatus” (single line) to update when I update when “canceled” is updated.
Here’s my code:
function callMeFromChangeRule(){ var arrOfIDs = []; jQuery.each(spjs.vLookup.dataObj.vLookupTasks[spjs.dffs.data.thisItemID].items,function(id,vLookupListItem){ arrOfIDs.push(id); }); spjs.utility.updateItem({ "listName":"{611AE134-3BE2-4FE2-8FED-3D9FB0905E65}", "id":arrOfIDs, "data":{"EventStatus":getFieldValue("Canceled")} }); }
Not sure how that slipped my mind…I knew that and completely missed it. Thanks again!
-
AuthorPosts