none
Unable to empty the info path form published column via SP Service

    Question

  • I have an info path form in which few columns are promoted to share point library data was updated from form to library, now we have a requirement that to update those promoted fields from jquery. data will be updated as expected but i'm unable to empty those fields using jquery. fields which are promoted are of type Date time and single line of text. i have use below script to update empty to column. unable to update empty from library edit properties also.

    

    Tuesday, May 02, 2017 6:37 AM

All replies

  • Hi,

    I have tested in my environment and it worked as expected. Here is my script

        $().SPServices.SPUpdateMultipleListItems(
    
        {
    
        webURL: "http://sp",
    
        listName: "Lib_forms",  
    
        CAMLQuery: "<Query><Where><Eq><FieldRef Name='ID'/><Value Type='Count'>1</Value></Eq></Where></Query>",    
    
        batchCmd: "Update",
    
        valuepairs: [["Date",""],["Text",""]],
    
        debug: false
    
        })
    
        //alert("a");

    If you try to empty the two columns via UI, will it work fine? Are these columns required to contain information?

    Thanks,

    Dean Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    Friday, May 05, 2017 2:12 AM
    Moderator
  • Hi,

    i have tried to empty the columns using library edit properties,but it wont work. Actually i have an info path form in which start date, End date, month & year and duration fields are there(4 fields are published to from library). in these 4 fields any 2 will be mandatory every time its working fine in form. now i'm trying to update empty in those fields from script,here i'm facing problem.

    eg: while in submission time i have given start date,end date.but after submission i'm trying to set month& year,duration fields and by making already given start date and end date fields empty.

    Tuesday, May 09, 2017 11:26 AM
  • Hi,

    You said that you have tried to empty the columns using library edit properties but no luck. Did any error message occur when you tried to empty these columns?  Have you set these columns required to contain information?

    Thanks,

    Dean Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, May 16, 2017 11:44 AM
    Moderator
  • Hi,

    i didn't get any error message while updating(popup was closed without any error). those columns are not mandatory, i didn't create those columns i have published those columns from info path form

    Tuesday, May 16, 2017 12:51 PM
  • Hi,

    So, if you edit item via InfoPath form > empty the two columns manually > submit the form, the values are not empty, am I right?

    You can check the field settings in the InfoPath form.

    Thanks,

    Dean Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, May 22, 2017 9:17 AM
    Moderator
  • Hi,

    yes. i can able to empty the columns using info path form. but i want it using SP Services. which settings do i need to verify in info path form.

    Saturday, June 10, 2017 5:26 AM