populate text box with field from data connection - InfoPath Dev
in

InfoPath Dev

populate text box with field from data connection

Last post 05-04-2015 04:00 PM by Jay@Work. 25 replies.
Page 2 of 2 (26 items) < Previous 1 2
Sort Posts: Previous Next
  • 04-28-2015 09:34 PM In reply to

    Re: populate text box with field from data connection

     I haven't created any extra data connections yet (I thought this was specifically to deal with only one value in the drop down... which I can live with for now until the other bit works). But I can if you think it will help with the updating of the field?

    2 screen shots, 1st is the drop down selection and a blank field. Second is the relevant row from the secondary data connection showing that user and associated area.
    As an aside, would this data connection querying not show up in Fiddler? I was looking in fiddler to see what was being passed/returned but it shows no traffic when I make drop down selections

    https://onedrive.live.com/redir?resid=c18b04d5bb544db4!5637&authkey=!AKTy8C-qmlJl5tU&v=3&ithint=photo%2cPNG

    https://onedrive.live.com/redir?resid=c18b04d5bb544db4!5638&authkey=!AG7dQe5lzeSru6Y&v=3&ithint=photo%2cPNG 

  • 04-29-2015 07:40 AM In reply to

    Re: populate text box with field from data connection

    I would expect the query to show up in Fiddler. I see in the sample template you uploaded to One Drive that you are executing the query. I would drag that data source onto the form so I could verify that the query field is being set and that the query is returning results.

    Hilary Stoupa

  • 04-29-2015 12:56 PM In reply to

    Re: populate text box with field from data connection

    Thanks, can you explain what you mean when you say drag the data source onto the form please?
    When I click manage connections I see no way to drag anything onto the form. Am I misunderstanding?

  • 04-29-2015 04:56 PM In reply to

    Re: populate text box with field from data connection

     Sorry, I had fiddler set up to only record IE traffic for some reason.
    The rule is generating traffic... not sure if this helps us get to the bottom of the rule not doing what we want though.
    So from what I can see, when I make a drop down selection the list is getting queried and the name, title and area of my selection is getting returned... but then?
    Nothing to do with the fact that the value is email but the display value is the name? Could it be as simple as us asking where email = name where we actually mean name = name?

     

    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetListItemsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/"><GetListItemsResult><listitems xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882' xmlns:rs='urn:schemas-microsoft-com:rowset'

    xmlns:z='#RowsetSchema'>
    <rs:data ItemCount="1"><z:row ows_Title='Darrylxxxx' ows_Email='darrylxxxxx'ows_Area='PSA' ows_ID='26' ows_MetaInfo='26;#' ows__ModerationStatus='0' ows__Level='1' ows_UniqueId='26;#{9E92EC74-A4C6-46A8-8376-C1A72FB56316}' ows_owshiddenversion='2' ows_FSObjType='26;#0' ows_Created='2014-07-11 14:01:43' ows_PermMask='0x7fffffffffffffff' ows_Modified='2015-03-24 07:53:38' ows_FileRef='26;#site/corp/healthsafety/Lists/Health and Safety Reps/26_.000' /></rs:data>
    </listitems></GetListItemsResult></GetListItemsResponse></soap:Body></soap:Envelope>

     

  • 04-29-2015 05:03 PM In reply to

    Re: populate text box with field from data connection

    Since you are only returning one row in the data source, you don't need a filter on the rule to set the value, right?

    Hilary Stoupa

  • 04-29-2015 05:11 PM In reply to

    Re: populate text box with field from data connection

    To be honest... I don't know :)

    I haven't tried this before and everything I have done has been on advice/templates received here.
    Outside of InfoPath I could do this a breeze 

  • 05-03-2015 03:37 PM In reply to

    Re: populate text box with field from data connection

    As far as I know I only need to match where the name (display) in the drop down matches the name in the HRRep list.
    From that lookup I need to return the "area" from the list and put this in the HS_Dept text box.

    Sounds like it should be very easy, I can't see what is causing it to not populate 

  • 05-04-2015 11:59 AM In reply to

    Re: populate text box with field from data connection

    What I am trying to explain is that it appeared to me that you were running a query that would return only one item - so you should be able to set the field to the value of that column in the secondary data source without using an XPath filter at all.

    Hilary Stoupa

  • 05-04-2015 03:45 PM In reply to

    Re: populate text box with field from data connection

    I am not sure there is a filter in place (see image at path below).
    https://onedrive.live.com/redir?resid=c18b04d5bb544db4!5649&authkey=!AFBibdN3kjZP2mA&v=3&ithint=photo%2cPNG

    Should I re-upload the template? 

  • 05-04-2015 03:47 PM In reply to

    Re: populate text box with field from data connection

    You are setting the field to the query field value, not the data field. The query field is likely blank.

    Hilary Stoupa

  • 05-04-2015 04:00 PM In reply to

    Re: populate text box with field from data connection

     You are a star!!! Thank you.

    That is exactly what it was. 

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