Forum Replies Created
-
AuthorPosts
-
Alexander BautzKeymaster
Here is a modified version that should work in SP2010:
function getAttachments(id){ var url = _spPageContextInfo.webServerRelativeUrl+"/_vti_bin/ListData.svc/TheNameOfTheList("+id+")/Attachments"; $.getJSON(url, function(data) { var b = []; spjs.$.each(data.d.results,function(i,o){ b.push("<div><a href='"+o.__metadata.media_src+"' target='_blank'>"+o.Name+"</a></div>"); }); spjs.dffs.dlgBox(b.join(""),true); } ) }
Change “TheNameOfTheList” with the name of your list like it is shown in the “href” attribute when you access this URL:
https://YourSiteUrl.com/YourSite/_vti_bin/ListData.svc
The record looks like this:
<collection href="TasksListTest"> <atom:title>TasksListTest</atom:title> </collection>'
Alexander
Alexander BautzKeymasterHi,
When you have this many rules, you should use the “No reversing of this rule” for any rules you don’n want to “reverse” if they do not match. Use the “Stop if this rule = true” and maybe the “and jump to” to skip rules that does not have to be validated.If you don’t use these options, all 77 rules will be evaluated when you load the form.
Also you should put vLookups in separate tabs to prevent them from loading when the form loads. If you do this, the vLookup will only be loaded if you click the tab containing the vLookup.
Hope this helps,
AlexanderAlexander BautzKeymasterI’m not so familiar with it, but if it supports “select” tags you might be able to address these and use it. You would have to test it to see.
Alexander
October 28, 2015 at 18:49 in reply to: Save on Edit form returns to Dispform instead of list view #9094Alexander BautzKeymasterHi,
I’ll look at changing this / making it an option for the next release, but until then you can use this code in the custom js in your dispform to override the current DFFS function:spjs.dffs.editItemWithTabIndex = function(){ var s, r, u = location.href.replace(/dispform.aspx/i,"EditForm.aspx"); r = ""; s = spjs.$("#tabWrapper").find('li.tabSelected').attr("tabIndex"); if(s!==undefined){ r = s; } if(spjs.dffs.data.sTabUseCookie){ spjs.dffs.setTabCookie(spjs.dffs.data.tabCookieName.replace("DispForm.aspx","EditForm.aspx"),r); } if(GetUrlKeyValue("ContentTypeId") === ""){ u = u.replace("&ContentTypeId=",""); } if(spjs.dffs.data.editFormInDlg){ spjs.dffs.openEditFormInDialog(u); }else{ location.href = u; } }
Alexander
Alexander BautzKeymasterIf you just want to show them in EditForm you can use something like this to read the values:
var res = spjs.utility.getItemByID({"listName":_spPageContextInfo.pageListId,"id":GetUrlKeyValue("ID"),"viewFields":["RelatedItems"]}); alert(res.RelatedItems);
This will output something like this (two related items):
[{"ItemId":31,"WebId":null,"ListId":null},{"ItemId":45,"WebId":"5b315066-48ba-42b1-9ef1-1387b67dcd9b","ListId":"5f82a17a-d27b-4f6d-8c2b-fa201e40b40b"}]
This must then be converted into a proper “link”, but if it is internally in one list you can use the “ItemId” directly to create the link using “/Site/List/DispForm.aspx?ID=XYZ”.
PS:If the link is internal in the list, the ListId and WebId parameter is null.
Alexander
Alexander BautzKeymasterHi,
You should be able to refer this library (JS and CSS files) in your CEWP (or custom area in JSLink setup) and address the textarea like this:$(function() { $("#dffs_textAreaFieldInternalName").find("textarea").resizable({ handles: "se" }); });
Change “textAreaFieldInternalName” for your fields internal name.
Please note that this will work for plain text fields only.
Alexander
October 28, 2015 at 12:36 in reply to: need help on CAML query – how to filter on a [today] – days #9073Alexander BautzKeymasterHi,
The CAML depends on the type of the fields “Associate_x0020_Name” and “Defect_x0020_Type” are, but basically your CAML should look like this:<Where> <And> <And> <Eq><FieldRef Name="Associate_x0020_Name" /><Value Type="Text">[currentItem:Associate_x0020_Name]</Value></Eq> <Eq><FieldRef Name="Defect_x0020_Type" /><Value Type="Text">[currentItem:Escalation_x0020_Category]</Value></Eq> </And> <Geq><FieldRef Name="Defect_x0020_Date" /><Value Type="DateTime"><Today OffsetDays="-365" /></Value></Geq> </And> </Where>
Alexander
October 27, 2015 at 23:57 in reply to: Rule to check to if current user is the creator of the item #9063Alexander BautzKeymasterHi,
Use the trigger “Compare logged in user with people picker field” and specify “Author” in the “This value” field. You find information by hovering over the help icon.Alexander
Alexander BautzKeymasterThis is what I use in the vLookup solution:
var theUniqueID = _spPageContextInfo.userId+":"+new Date().valueOf();
Alexander
Alexander BautzKeymasterHi,
It’s technically possible to have the related items functionality visible in EditForm, but if you change the related items, you are updating the current item – and will receive a save conflict when trying to save the form.Therefore it is unfortunately not very practical to have it in other than the DispForm.
Alexander
Alexander BautzKeymasterYes, the column is not found in a default NewForm, but is selectable in DFFS backend. This calls for and easy misunderstanding.
You can use a trigger looking at the “ContentTypeId” in the query string of the URL – look at the trigger “URL Query string key equals” in the rules and create rules based on the various “ContentTypeId” strings.
Alexander
Alexander BautzKeymasterYou must split the date and reassemble it in the correct format. If your date format is “US” like this: 10/27/2015 you can use something like this:
var d = getFieldValue("TheDateColName").split("/"); data.End_x0020_of_x0020_Week_x0020_Da = d[2]+"-"+d[0]+"-"+d[1]+" 12:00:00";
Alexander
October 27, 2015 at 18:11 in reply to: Save on Edit form returns to Dispform instead of list view #9032Alexander BautzKeymasterAre you opening the form from DispForm or from a list view? I have done some changes to the “Source” when editing an item from DispForm so it might be this causing the problem.
Alexander
Alexander BautzKeymasterHi,
In which form are you trying to use the ContentTypeChoice (the same columns, just named differently in DFFS)?Alexander
October 27, 2015 at 17:33 in reply to: Save on Edit form returns to Dispform instead of list view #9023Alexander BautzKeymasterHi,
I suspect the “Launch EditForm in a dialog from DispForm” setting in the Misc tab can be the problem here. Can you enter DFFS backend and look at the Misc tab to see if this is checked?Alexander
-
AuthorPosts