-
Search Results
-
I have several lists that have a lookup column to another list (basic SP functionality). When a user views one of these lists and clicks the default hyperlink for the lookup column it opens the lookup column list item in a Modal Dialog. I would like for the linked list item to open in a full window or even a new window/tab instead.
I am looking for a native SharePoint Online way to do this but I am not having success.
All the lists, including the list linked too, are using DFFS forms so if I can’t find a native SPO way to do it, I was wondering if in the DFFS form if I could detect that the windows is a modal dialog and redirect to a full window, or maybe just display a button/icon for the user on the form when modal dialog to optionally switch out of the modal dialog to a full window.
Hi Alex,
I’m using the attachSPJSChartsSelectHandler event handler as prescribed in user manual. When I have 1 chart on the page the event triggers correctly. When I put a second chart on the page and click on the chart with the event handler attached the event triggers twice! (In my case because I launch a new tab it opens two tabs in the browser. Is this a known issue and is there any way around it?
Secondly, can I attach a different events to two (or more) charts on the same page?Kind regards
Ian
This is my modified code:
attachSPJSChartsSelectHandler(“Delivery”);function attachSPJSChartsSelectHandler(id){
try{
google.visualization.events.addListener(spjs.charts.data.charts[id], ‘select’, function(e){
var selection = spjs.charts.data.charts[id].getSelection();
var data = spjs.charts.data.chartData[id];
var message = ”;
var _date=”;
for (var i = 0; i < selection.length; i++) {
var item = selection[i];
if (item.row != null && item.column != null) {
_date=data.cache[item.row][0].Me;
var str = data.getFormattedValue(item.row, item.column);
message += ‘{row:’ + item.row + ‘,column:’ + item.column + ‘} = ‘ + str + ‘\n’;
} else if (item.row != null) {
var str = data.getFormattedValue(item.row, 0);
message += ‘{row:’ + item.row + ‘, column:none}; value (col 0) = ‘ + str + ‘\n’;
} else if (item.column != null) {
var str = data.getFormattedValue(0, item.column);
message += ‘{row:none, column:’ + item.column + ‘}; value (row 0) = ‘ + str + ‘\n’;
}
}
if (message == ”) {
message = ‘nothing’;
}
var _fdate=Date.parse(_date).toString(“yyyy-MM-dd”);
//Open a new window pass in date//New window
window.open(‘https://MyCompany.sharepoint.com/sites/KPI/SitePages/KPIDetail.aspx?COL=’+_fdate,’_blank’);
//alert(‘You selected ‘ + message + ” : ” + _fdate);
});
}catch(ignore){
setTimeout(function(){
attachSPJSChartsSelectHandler(id);
},1000);
}
}Topic: Form access rules
I have an open access SharePoint site. I created a custom form that only a select group of users can fill out. To restrict access, I created a new user group. Using rules I selected the option SharePoint group membership: Logged in user is a member of group. Under This value, I added the membership group ID. I also tried using the group name. During testing, the users are able to select the link and fill out the form. Note I also tried selecting Logged in user is NOT a member.
Is it possible to restrict access on a form on an open access site? I’ll also add we also have another group that responds to another form/list and that works successfully.
Thanks,
AndraTopic: Custom JS examples
Topic: v0.9.0.10 has been published
Another round of updates based on your feedback. Some new functionality has been added and I have fixed a few bugs in the overriding of the buttons and menus in the list view to ensure the modern DFFS form is opened and not the out-of-the-box SharePoint form.
I’ll post some examples on Custom JS for this new version later this week.
Most Custom JS created for the classic DFFS will unfortunately not work, but setFieldValue and getFieldValue will. Use it like this:
// Set the Title field setFieldValue("Title", "The title field value"); // Set a date field 14 days ahead of today let date = new Date(); date.setDate(date.getDate() + 14); setFieldValue("DateAndTime", date);
Please post any feedback below or email me if you cannot post in the forum.
Alexander
Hi Alexander, I currently have a ‘Save & Copy to New Form Entry’ button and working perfectly; however, the team also needs to create a ‘Copy to New Form Entry’ from a DispForm or EditForm. I wasn’t able to figure out how to add the button from DispForm since there is a Save
I couldn’t even get it started from DispForm at all. I started to from EditForm but it’s trying to copy to another EditForm instead of Copying to a NewForm
http://contoso.com/sites/xxx/xxx/Lists/xxx/EditForm.aspx?CreateCopy=1
if I changed the address line to …..NewForm.aspx?CreateCopy=1 then it’s perfect.
1 – What can I change below so it doesn’t require a Save to trigger the copy and start new entry?
2 – What can I change from the following code to have the CreateCopy=1 open as NewForm instead of EditForm?
3 – What can I change from the code below to add a button and trigger copy/start new form from Display?// If creating a copy
if(GetUrlKeyValue(“CreateCopy”) === “1”){
var str = sessionStorage.getItem(“SaveAndCreateNewData”), data;
if(str !== null){
data = JSON.parse(str);
jQuery.each(data,function(fin,val){
setFieldValue(fin,val);
});
}
}
// Add button
jQuery(“input[id$=’_diidIOSaveItem’]”).after(“<input type=’button’ class=’ms-ButtonHeightWidth’ style=’margin-right:4px;’ value=’Copy & Start a New Entry’ onclick=’saveAndCopy()’ />”);
var createCopyWhenSaving = false;
function saveAndCopy(){
createCopyWhenSaving = true;
spjs.dffs.triggerSave();
}
function dffs_PreSaveAction(){
if(createCopyWhenSaving){
var arr = [
“FieldInternalNameA”,
“FieldInternalNameB”,
“FieldInternalNameC”
];
var data = {};
jQuery.each(arr,function(i,fin){
data[fin] = getFieldValue(fin);
});
sessionStorage.setItem(“SaveAndCreateNewData”,JSON.stringify(data));
// Redirect
spjs.dffs.redirect(location.pathname + “?CreateCopy=1”,false);
}
return true;
}