Retrieving a list item inside a page using InfoPath 2010 form web part - InfoPath Dev
in

InfoPath Dev

Retrieving a list item inside a page using InfoPath 2010 form web part

Last post 07-24-2012 09:58 AM by Dangermouse500. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-23-2012 07:51 AM

    Retrieving a list item inside a page using InfoPath 2010 form web part

    Hi, I'm fairly new to InfoPath and have created a custom list which stores all the fields I need. I then created an InfoPath form to display them nicely and added this to a page. At the moment it I have it working so that the initial submission is made via the webpage and an email is sent to a person who needs to update another field from the custom list. I have done this by emailing them a URL which points directly to the list with ID in the query string and it retrieves the data for updating fine.

    The problem is that users can delete the item in the ribbon and it would be better if I could send the user an email with the URL to the webpage instead which would retrieve the given record for updating. I have tried using the Query String URL filter with the InfoPath web part but all it seems to do is populate the given field with whatever value is in the query string rather than getting all fields and populating them in the form for that specific record.

    I want to use the ID as the filter if possible. I cannot see the property promotion option in the forms options, I think that is something to do with me associating the form with my custom list. Is what I am trying to achieve possible and can you please tell me how I can do it (bear in mind I am still learning this!).

    Thanks

  • 07-24-2012 08:02 AM In reply to

    Re: Retrieving a list item inside a page using InfoPath 2010 form web part

    I'm not 100% sure I understand (not your fault, you tried to be clear - just sometimes this stuff is hard to convey completely), but I think you are talking about promoting properties for web part connections, which isn't allowed in list forms, if I recall correctly.

    So, I think you'll need to add logic to your list form to populate the fields when you pass the ID in via the URL. Your form should have query fields & data fields in the data source - you'll have to use the advanced view of the data source task pane. You could set a rule on the data fields ID field that would set the query field ID field and run the query - this would populate the fields.

    However, this may have some unintended consequences - you'll want to test this pretty thoroughly. Make sure this doesn't cause issues when you create and save new items, for example.

    Hilary Stoupa

  • 07-24-2012 09:14 AM In reply to

    Re: Retrieving a list item inside a page using InfoPath 2010 form web part

    Thanks Hilary, you're quite correct about the first point. I am in the process of trying to rewrite it an InfoPath form and as a template for a new InfoPath library. I've created all my fields in the InfoPath form and I'm now up to the point where I guess I would need an ID field! Basically some kind of numeric incrementing. Would this be a better way of doing it than my custom list method?

    Anyway, I would like to try out your suggestion but I don't really understand exactly what you mean sorry. My form has the default main connection which is the custom list and this is where everything is received and saved. There are also other custom lists it uses for lookups. How do I go about setting the query field ID? Apologies if this is easy and obvious, I'm just learning all this!

  • 07-24-2012 09:32 AM In reply to

    Re: Retrieving a list item inside a page using InfoPath 2010 form web part

    If you start with a new, blank InfoPath template, you won't be able to submit to a SharePoint List out of the box, so you know. You can submit to a form library, which may be fine for what you need - it really just depends on your requirements.

    If you take your custom list form and look at the data source task pane (this is the task pane on the right that shows your fields), at the bottom should be a little link to show in advanced view. Click that. Then you'll see the actual main data source. There are query and data fields.

    You could add a rule to the data field ID field and set the query field ID field using a rule - the rule would be an action rule that sets a field's value. You'd select the query field instance of the ID field, and set it to the data field instance of the ID. Hope that makes sense?

    Hilary Stoupa

  • 07-24-2012 09:58 AM In reply to

    Re: Retrieving a list item inside a page using InfoPath 2010 form web part

    That's brilliant, thanks Hilary.

    I'll try that later and get back to you, I've just found out that I can hide the Edit/Delete options in the Ribbon so that users cannot mess with the data. This should resolve my initial problem anyway by changing the Form Options. In the Web Browser tab I've unticked the Show InfoPath and in teh Filler Features I've unticked the options there too.

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