Forum Replies Created
-
AuthorPosts
-
PERFECT!!! Thank you!
Is there anyway to use dlgBox on presave and not allow the form to continue to save until the Ok button is clicked? I know this is a “non-blocking” solution but I’m trying to see if there is anyway to use it in conjunction with presave or any other way as the out of the box alert boxes can be blocked but Chrome and aren’t as nice.
function PreSaveAction() {
spjs.dffs.dlgBox(“<i class=’fa fa-floppy-o fa-4x iconGood’ aria-hidden=’true’></i><p>Thank you for your submission!<p><p>You will be notified when your request is ready for User Acceptance Testing as well as when it has been deployed to production.<p><p>Feel free to use the My Requests page to view all of your requests and their progress.</p>”,false,function(){
// your OK function
spjs.dffs.closeDlg();
return true;
});
return false;
}This new version is throwing an error. I’m not sure if it is because I am using your last production version for everything else or not? This is the only beta file I am referencing.
I confirmed I’m using 3.7.1 Beta for front and back. Should I go back to 3.7.0?
Sorry, running SharePoint 2010.
My parent list is open in a dialog and the vLookup forms open in a dialog. I am using your latest production version (4.4.2.9).
I’m not sure if I’m doing it the most efficient way possible but yes, I did get it working.
Sorry, I figured out how to clear all options.
spjs.casc.clear(“HighRiskProcess”,0)
Actually, I cant get my second cascade selected options to clear for some reason. So if you have a way to reset all selected options to nothing please let me know.
I figured out a method to call my function when adding/removing options which I have provided below. You may have a better option for me. I also figured out I can clear all selected options if I setFieldValue to “” and reinitialize my casc.
$().ready(function () {
checkForDOMAndCalculate();
});function checkForDOMAndCalculate() {
setTimeout(checkDOM, 100);
}function checkDOM() {
if( $(‘#HighRiskProcess_casc_btnRemove’).length ){
$(“#HighRiskProcess_casc_btnAdd”).click(function() {highRiskProcess()});
$(“#HighRiskProcess_casc_btnRemove”).click(function() {highRiskProcess()});
}
else{
checkForDOMAndCalculate();
}
}Thank you. I have tried this but think I am formatting my filter line incorrectly. What is wrong with the below?
“filter”:”{‘filterField’:’myField’,’filterValue’:’myValue’,’operator’:’eq’}”,
I worked around this by using your out of the box redirect from New to Edit and added an onload function on edit that prompts the user if they would like to be directed to the display form. If yes I use your new redirect function to redirect them to dispform. Not super elegant and a bit jumpy for the user but it does the trick. If there is a better way please let me know. Maybe in a future enhancement you provide the ability to redirect from New to Disp. The main purpose was to get them to where they could print.
- This reply was modified 7 years, 8 months ago by Kasey.
Final update to function. I thought I tested it fully but didn’t.
function setParentFromChild(vLookup,vLookupChildField,parentField){
var parentID = getFieldValue(“ID”);
var childValues = [];
for (childItem in spjs.vLookup.dataObj[vLookup][parentID].items) {
childValues.push(spjs.vLookup.dataObj[vLookup][parentID].items[childItem][vLookupChildField]);
};
setFieldValue(parentField,childValues[0]);
}Updated Function…
function setParentFromChild(vLookup,vLookupChildField,parentField){
var parentID = getFieldValue(“ID”);
var childValues = [];
for (childItem in spjs.vLookup.dataObj[vLookup][parentID].items) {
spjs.vLookup.dataObj[vLookup][parentID].items[childItem][vLookupChildField]
childValues.push(childItem);};setFieldValue(parentField,childValues[0]);
}Here is the function I plan on implementing. I would only allow add/edit on New or Edit. Is there a trigger I can use to know when to call the function after a child vlookup has been added or edited? And is there a way to limit to just one child item. Sorry for all the posts.
function setParentFromChild(vLookup,vLookupChildField,parentField){
var parentID = getFieldValue(“ID”);
var childValue = for (childItem in spjs.vLookup.dataObj[vLookup][parentID].items) {spjs.vLookup.dataObj[vLookup][parentID].items[childItem][vLookupChildField]};
setFieldValue(parentField,childValue);
}- This reply was modified 7 years, 9 months ago by Kasey.
-
AuthorPosts