0

I have a Sharepoint-hosted app.

The app is a survey page were users answer questions and hit a save button to send the answers to a sharepoint list. After that they going to the list and want to read their answer. Now we get to the problem:

I want that when they click on the (Title where it stand "No Title"(picture 1)) i want a dialog to pop up with the same survey form and the answers inte the textboxes. Is get_item an option?

pic1

var clientContext, hostweburl, parentContext, parentWeb, list;

clientContext = new SP.ClientContext.get_current();
hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
parentContext = new SP.AppContextSite(clientContext, hostweburl);
parentWeb = parentContext.get_web();
list = parentWeb.get_lists().getByTitle("CoromaticIFU");


$(document).ready(function () {
    $("#tabs").tabs();
    $(document).tooltip();
    $('#GEN_4').datepicker({ dateFormat: 'yy-mm-dd' }).val();
    $('#save').click(setItems);



});


function setItems() {
   var listCreationInformation = new SP.ListItemCreationInformation(), listItem = list.addItem(listCreationInformation);

    listItem.set_item('GEN_1_Sum_Scope_Assigment', $('#GEN_1').val());
    listItem.set_item('GEN_1_Sum_Scope_Assigment_D', $('#GEN_1_D').val());
    listItem.set_item('GEN_2_CRMname', $('#GEN_2').val());
    listItem.set_item('GEN_2_CRMname_D', $('#GEN_2_D').val());
    listItem.set_item('GEN_3_F_Mapp', $('#GEN_3').val());
    //It's 224 rows with (listItem.set_item)
    listItem.update();

clientContext.load(listItem);
clientContext.executeQueryAsync(function (success) { alert("Din sparning lyckades!"); }, function (sender, args) { alert('Error:' + args.get_message()); });   
}
  • What is the difference between this post and sharepoint.stackexchange.com/questions/119210/… – Robert Lindgren Oct 27 '14 at 14:36
  • "This requirement is different than what you mentioned in the original question. You should perhaps open a new question for this." – Nadeem Yousuf – linkan94 Oct 27 '14 at 14:40
  • Do you agree that it is a different question? Because I feel that you you have asked all the time to show details ("View Properties") for a list item on click of title? – Robert Lindgren Oct 27 '14 at 14:43
  • Yes i do, i didn't write in my last question about that i want to get the style of my survey page to show up in the dialog – linkan94 Oct 27 '14 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.