Alexander Bautz

Forum Replies Created

Viewing 15 posts - 4,096 through 4,110 (of 4,557 total)
  • Author
    Posts
  • in reply to: Cascading Drop Down when more than 5000 items? #8723
    Alexander Bautz
    Keymaster

    Could you try changing to only ONE level (field) in the cascading dropdown configuration in DFFS backed to see if this prevents the error? – also, the indexing might take some time to complete so maybe you need to retest this tomorrow.

    Alexander

    in reply to: Cascading Drop Down when more than 5000 items? #8717
    Alexander Bautz
    Keymaster

    Yes, It has to do with this setting, but my “plan” with the “queryItemsThrottled” in SPJS-utility.js was to overcome this limitation but splitting the query in chunks of 5000 items.

    Could you possibly try to index the columns you use in the dropdown (in the source list) to see if this helps?

    PS: Are some of these columns of lookup, person or taxonomy / managed metadata?

    Alexander

    Alexander Bautz
    Keymaster

    Hi,
    Can you post the URL to your NewForm? – replace the domain with “contoso.com” to not reveal your real domain name.

    Alexander

    in reply to: Display a calculated column display value in edit form? #8697
    Alexander Bautz
    Keymaster

    Hi,
    From your code snippet it looks like you must change the quotes in your last line – the last one looks like it is not right.

    If this is not the issue, please include the error message you receive.

    Alexander

    in reply to: DFFS – refering to a 'parent' form #8695
    Alexander Bautz
    Keymaster

    This should do the trick:

    function checkLookupFieldValue(){
    	var data, lookupValue, currValue = getFieldValue("EditFormInput"), a = 0, b;
    	data = spjs.utility.getItemByID({"listName":_spPageContextInfo.pageListId,"id":spjs.dffs.data.thisItemID,"viewFields":["LookupExtraFieldInternalName"]});
    	lookupValue = data["LookupExtraFieldInternalName"]; 
    	if(lookupValue !== null){
    		$.each(lookupValue.split(";#"),function(i,s){
    			if(i % 2 !== 0){
    				if(a === 0 || parseInt(s,10) < a){
    					a = parseInt(s,10);
    				}
    			}
    		});
    		b = parseInt(currValue,10);
    		return a < b;
    	}
    }

    Please change “LookupExtraFieldInternalName” and “EditFormInput” to your own field names.

    Let me know if this works.

    Alexander

    in reply to: DFFS Set Field Value / Formatting #8694
    Alexander Bautz
    Keymaster

    I’m glad it worked!

    Alexander

    Alexander Bautz
    Keymaster

    Hi,
    This code example will pull the date from a field named “Birthday”, and write it to a field named “Age”. Please note that this will be a static value, and will not automatically tick up a notch next year without you editing the list item.

    Put this in the Custom JS:

    function calculateAge(){
    	var dfo, sDate, now, age;
    	dfo = spjs.dffs.getRegionalSettings().DateFormat;
    	sDate = spjs.dffs.strToDateObj("Birthday",dfo);
    	now = new Date();
    	age = now.getFullYear() - sDate.getFullYear();
    	if(now.getMonth() < sDate.getMonth()){
    		age -= 1;
    	}else if(now.getMonth() === sDate.getMonth()){
    		if(now.getDate() < sDate.getDate()){
    			age -= 1;
    		}
    	}
    	setFieldValue("Age",age);
    }

    Then call this function from a rule in DFFS by putting the function name in the “Run these functions / trigger these rules” field.

    Let me know how it works out.

    Alexander

    in reply to: Cascading Drop Down when more than 5000 items? #8690
    Alexander Bautz
    Keymaster

    Can you post the config / query for the cascading dropdown?

    Alexander

    in reply to: Cascading Drop Down when more than 5000 items? #8685
    Alexander Bautz
    Keymaster

    Hi,
    Sorry, I forgot to tell I need to see the “Response” also – can you add it?

    Alexander

    in reply to: Edit button Bug on Display form #8684
    Alexander Bautz
    Keymaster

    Hi,
    I’m unable to recreate this issue.

    Could this be an issue with for example the check out list item rule setup?

    If not, could you email me some screenshots of your setup and a more detailed description so I can try to recreate it? – you find my email in the “About me” tab above.

    Alexander

    in reply to: DFFS – refering to a 'parent' form #8678
    Alexander Bautz
    Keymaster

    Hi,
    This will also require a custom function. Create a rule with trigger “Custom JavaScript function”, and add this to the “This value” field: “compareLookupFieldValue”. Then add this to the Custom JS section:

    function compareLookupFieldValue(){
    	var data = spjs.utility.getItemByID({"listName":_spPageContextInfo.pageListId,"id":spjs.dffs.data.thisItemID,"viewFields":["LookupExtraFieldInternalName"]}), lookupValue = data["LookupExtraFieldInternalName"], currValue = getFieldValue("EditFormInput"), a, b;
    	if(lookupValue !== null){
    		a = parseInt(lookupValue.split(";#")[1],10);
    		b = parseInt(currValue,10);
    		return a < b;
    	}else{
    		return false;
    	}
    }

    Please change “LookupExtraFieldInternalName” and “EditFormInput” to your own field names.

    Let me know how this works out.

    Alexander

    • This reply was modified 8 years, 7 months ago by Alexander Bautz. Reason: fixed typo
    in reply to: DFFS Set Field Value / Formatting #8677
    Alexander Bautz
    Keymaster

    Hi,
    You cannot do this directly in the “set field value” section in the rule.

    If you want the ID to be generated on save, add a rule with the trigger “The form is saved”, and add “generateCustomID” in the “Run these functions / trigger these rules” field.

    Then you add this to the Custom JS section:

    function generateCustomID(){
    	var p = getFieldValue("ProgramType").charAt(0), id = spjs.dffs.data.thisItemID;
    	while(id.length < 4){
    		id = "0"+id
    	}
    	setFieldValue("IdNumber",p+"-"+id);
    }

    Please note that you must change the fieldname “ProgramType” and “IdNumber” to your own field names.

    Let me know how this works out.

    Alexander

    in reply to: Edit button Bug on Display form #8669
    Alexander Bautz
    Keymaster

    The edit item bug is related to v4.355 FRONTEND, but I had forgot to add to the change log that I had fixed the error (I have added it now).

    You should have v4.357 FRONTEND to fix the problem.

    Sorry for the inconvenience,
    Alexander

    in reply to: Edit button Bug on Display form #8666
    Alexander Bautz
    Keymaster

    Hi,
    Can you verify that you have the latest version of DFFS frontend (October 6)? – I had a bug in one of the latest versions related to a fix for an edit button issue in SP2010.

    Alexander

    in reply to: Cascading Drop Down when more than 5000 items? #8662
    Alexander Bautz
    Keymaster

    Could you bring up the developer console (hit F12) and look at the “Network” tab. Double click the “lists.asmx” line with status 500 (or the red one) – can you send me the details from the “Request header” and “Response header”?

    Also, can you double check the spjs-utilty.js version by bringing up the developer console and select the “Console” tab. Enter this by the cursor and hit enter:

    spjs.utility.version

    Whet does the version number read?

    Alexander

Viewing 15 posts - 4,096 through 4,110 (of 4,557 total)