Binding a Infopath textbox with filtered value - InfoPath Dev
in

InfoPath Dev

Binding a Infopath textbox with filtered value

Last post 01-19-2009 09:32 PM by ravi_kadri. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 01-18-2009 10:24 PM

    Binding a Infopath textbox with filtered value

    Hi: 

    I have a dataset with the flowing format. Is there any way to bind a infopath textbox with a filtered value? Say example. I want to bind ‘Pension Join Service amount to a textbox. <NewDataSet xmlns=""><Table diffgr:id="Table1" msdata:rowOrder="0">  <CodeDesc>Pension Services</CodeDesc>   <DeductionAmnt>220</DeductionAmnt> </Table> Table diffgr:id="Table2" msdata:rowOrder="1">  <CodeDesc>Pension Assumed</CodeDesc>   <DeductionAmnt>220</DeductionAmnt>   </Table> <Table diffgr:id="Table3" msdata:rowOrder="2">  <CodeDesc>Pension Join Service</CodeDesc>   <DeductionAmnt>220</DeductionAmnt>   </Table><Table diffgr:id="Table4" msdata:rowOrder="3">  <CodeDesc>Pension Instocmmut</CodeDesc>   <DeductionAmnt>220</DeductionAmnt>   </Table>   <Table diffgr:id="Table5" msdata:rowOrder="4">  <CodeDesc>Pension Loan</CodeDesc>   <DeductionAmnt>220</DeductionAmnt>   </Table>  </NewDataSet> 

    Thanks!

    Ravi

  • 01-18-2009 10:32 PM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Binding a Infopath textbox with filtered value

    Hi,

    Add following function to the Text box.

    "DeductionAmnt[@rowOrder = 2]"

     rowOrder --> msdata:rowOrder

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 01-19-2009 02:42 AM In reply to

    Re: Binding a Infopath textbox with filtered value

     

    Hi:

     

    It would be great if you can you explain me this in bit detail? I am still not able to filter. 

    Thank you very much!

    Ravi

  • 01-19-2009 02:54 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Binding a Infopath textbox with filtered value

    Hi,

    Can you follow the below steps:

    1. Double click on the text box.
    2. Click on “fx” button under the default value.
    3. Click on “Insert Field or Group” button.
    4. Select your secondary xml name from Data source dropdown.
    5. Select “DeductionAmnt” field.
    6. Click on the “Filter data” button and click on “Add” button.
    7. Select “rowOrder” from first dropdown.
    8. Select “is Equal to” from second dropdown.
    9. Enter “2” number in the third dropdown.
    10. Click on ok until close all windows.
    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 01-19-2009 04:09 AM In reply to

    Re: Binding a Infopath textbox with filtered value

    Hi:

    Thanks for your help. But, I am stuck at point 7.

     I am not able see "rowOrder" in the filter dropdown box.  Is I am missing anything? I am not able see the rowOrder.

    Can you please help me in this?

    Ravi

  • 01-19-2009 04:12 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Binding a Infopath textbox with filtered value

    1. Select a Field or Group option in first dropdown. and select Row Order from secondary xml list.
    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 01-19-2009 04:28 AM In reply to

    Re: Binding a Infopath textbox with filtered value

    Hi:

     My data is coming from Database as a Dataset and it is not showing up roworder(in the InfoPath). I double checked and it is not showing up  in the InfoPath. I am still stuck. :(

     

    Ravi

  • 01-19-2009 04:51 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Binding a Infopath textbox with filtered value

    Did you added receive data connection to get the data from db?

    If you already added the data connection for db, then it will be displayed. Send me your xsn for better idea.

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 01-19-2009 06:13 AM In reply to

    Re: Binding a Infopath textbox with filtered value

    Hi,

    Try the following steps.

    1. Go to text box properties.

    2. Click on fx button.

    3. Click on Insert field or group. Select ‘DeductionAmnt' from the secondary source.

    4. Click Filter data. And click Add button.

    5. Select ‘CodeDesc' in the first drop down, is equal to in the second drop down, and enter ‘Pension Join Service' text in the third drop down.

    6. Click ok until all the windows gets closed.

     

     

    Note: If you want to change the filter value, then its better to store that value in a field and while filtering compare with that value.

    Swathip
    www.ggktech.com
  • 01-19-2009 09:32 PM In reply to

    Re: Binding a Infopath textbox with filtered value

    Hi Swathi:

     I followed exactly your method and the issue is Infopath doesnt filters. It looks like, i am missing infopath not able to find the filter values.

    Anyways, i modified the webservice return as a string value and now Infopath is happy with it.

    Thank you very much

    Thanks Anuma too....:)

     Have a great day!

    Ravi

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