How do i check the value of parent node - InfoPath Dev
in

InfoPath Dev

How do i check the value of parent node

Last post 05-05-2012 09:09 AM by Rahul2011. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-27-2012 09:11 AM

    How do i check the value of parent node

    Hi all, I am working on SOP process in through infopath repeating table. I have a field in repeating table like: CostAmount(Userwill enter this value), Budget, Acccount, Balance. Budget,Account,Balance are coming from Database thru data connection. I want to implement such functionality like: For example CostAmount Entered=500 Budget= Budget 1, AccountNumber=100-000-100, and balance displayed: 2000.....Now when the user select the same Budget ID, Account Number from next line of repeating table that time balance should be reduced like: Total Balance(2000) - already allocated amount in previous row(500)=1500 ...I believe this trick can be done by infopath repeating table rules, action and filteration. Please somebody help me to implement this trick.
  • 04-27-2012 03:11 PM In reply to

    Re: How do i check the value of parent node

    I'm sorry, but I'm having a hard time understanding your description. If you can attach a sample form (under the Options tab) it may help.

    In general, if you are looking to reference a sibling node you can use preceding-sibling or following-sibling - and I think that you are trying to reference a sibling by your description? Since you mention the "previous row".... Search for preceding-sibling on the forum and you may find something that helps you, or, again, feel free to post a sample.

    Hilary Stoupa

  • 04-28-2012 02:43 AM In reply to

    Re: How do i check the value of parent node

    Hi Hillary, Thanks for your reply...for your reference i have attache screen shot of the requirement. To overview of the screen shot whenever Budget and account is repeating in the repeating table, balance is decreasing by previous already allocated amount. i.e Actual balance - already allocated balance in previous rows.Please reply me with the trick how can i do this in infopath repeating table.
  • 04-30-2012 08:14 AM In reply to

    Re: How do i check the value of parent node

    Well, to get the balance field, for example, in a previous row, the XPath would look something like this:

    ../preceding-sibling::my:group2[my:Account = current()/../my:Account]/my:Balance

    With group2 replaced with your repeating group, and the other fields also set to the correct names for your data source.

    I'm thinking you may want to do this as a rule on your Item Cost and Account fields - run if any preceding-siblings have the same account number, for example.

    Hilary Stoupa

  • 05-05-2012 09:09 AM In reply to

    Re: How do i check the value of parent node

    Hi, Thanks for your reply...I would like to request you give me an alternate idea implement the similar functionality like: This is my idea: I want to save each line repeating table of in another repeating (in repeating table last field changed event), and for each line new entry i will search data from (new repeating table)..if the data found i will set my action....hope you understood...moral of this post is: while entering one repeating table another repeating table should be filled up with same information(this repeating table would be hidden for the user, for data reference purpose i will use this)...how can i implement this...please help me out.
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.