SubmitToSharePointList working in Preview but not browser - InfoPath Dev
in

InfoPath Dev

SubmitToSharePointList working in Preview but not browser

Last post 05-13-2016 09:06 AM by GwenW. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-13-2016 07:21 AM

    SubmitToSharePointList working in Preview but not browser

    Hi, I'm having the oddest issue. I have a simple form that is simply a button. Upon button click, I need a value (I'm using Userid , which is txt_UserName) to write to a list. The whole purpose is I simply need a way to trigger a workflow. I have created a map with the mapping tool. I'm adding screenshots (top is preview in InfoPath) and bottom is browser.  I've used this command many times and have this set up the same. The only difference is the simplicity. I don't have any external data connection (just the mapping and submit) and am passing only one field. I'm using InfoPath/SharePoint 2010, and qRules 6.1

    In the screenshot, I have the Execution history showing (wilsog is the txt_UserName field). The top (preview), you see the command runs and is successful. In the bottom (Browser) the Command field (yellow) is populating... so it's being set, just not executing (there is no execution history).  Any thoughts?

    Here's my Command (I know I don't need all of this but thought maybe it would help.. ) SubmitToSharePointList /submit=Submit /mapping=mapping 

    Here's my map (generated from the tool)

    <?xml version="1.0" encoding="UTF-16"?>

    -<myFields schemaVersion="6.1">
    -<Mappings mappingName="Pricing Index Mass Upload Submit">
    -<Properties>

    <Level>0</Level>

    <ParentMapping/>

    </Properties>

    <ListCollection ListName="Pricing Index Mass Upload Submit" useName="false">{2ECD370A-6270-4E9C-868E-CCF99C9EF7CE}</ListCollection>

    <IsRepeating>false</IsRepeating>

    <RepeatingGroup/>
    -<Relationships>

    <RelatedList/>

    <RelatedListId/>

    </Relationships>


    -<Mapping>

    <FormField IsParentId="false" IsDate="false" IsAttachment="false" IsId="false" IsRichText="false">my:myFields/my:txt_UserName</FormField>

    <SharePointColumn>User</SharePointColumn>

    </Mapping>


    -<Batch OnError="Continue">


    -<Method Cmd="New" ID="1">

    <Field Name="User"/>

    </Method>

    </Batch>

    </Mappings>

    <SharePointListURL>http://enetdev/sites/Athena</SharePointListURL>

    </myFields> 

    Thanks!

    Gwen 


  • 05-13-2016 08:03 AM In reply to

    Re: SubmitToSharePointList working in Preview but not browser

    You need to set postback to always on the control executing the command. PS > if your mapping data connection is named mapping, you don't have to include the /mapping param, and can just use SubmitToSharePointList /submit=Submit
    Hilary Stoupa

  • 05-13-2016 08:46 AM In reply to

    Re: SubmitToSharePointList working in Preview but not browser

    Thank you so much Hilary! It worked perfectly. That post back setting gets me every time. I guess I haven't had to set that on a button before because there are usually a bunch more other rules on it that "forces" it to do that? I don't know :).  

  • 05-13-2016 09:02 AM In reply to

    Re: SubmitToSharePointList working in Preview but not browser

    A quick trick I use in the browser to check if the issue is postback (as long as the ribbon is on the form) - hit the Close button, then cancel closing. That forces a post back and you'll see your command has "magically" executed. In general, in browser forms, all controls that execute a command should have postback sent to always, so the code will execute. :)
    Hilary Stoupa

  • 05-13-2016 09:06 AM In reply to

    Re: SubmitToSharePointList working in Preview but not browser

    Cool, I'll try that. Thanks! 

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.