how to solve the problem with xpath - InfoPath Dev
in

InfoPath Dev

how to solve the problem with xpath

Last post 01-17-2007 04:39 PM by smileforest. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-16-2007 11:52 PM

    how to solve the problem with xpath

    HI, is there anyone can help me?
    here is a xml piece:
    <my:group1>

    <my:group2>
    <my:time>20070101</my:time>
    <my:person>1</my:person>
    </my:group2>

    <my:group2>
    <my:time>20070116</my:time>
    <my:person>16</my:person>
    </my:group2>

    </my:group1>
    i use an expression box to find the latest time in my repeating table with xpath code: xdMath:Max(my:group1/my:group2/my:time),how to find the responseable person field which has the latest time field??

    thanks a lot!!
  • 01-17-2007 03:49 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: how to solve the problem with xpath

    Hi smileforest,

    Your xpath is correct to find the maximum value from time field. Can you tell me the ‘time#%92 field data type? Math.Max will return the largest value of all the numerical elements in a node set. If your ‘time#%92 data type is integer or double it works correctly.
  • 01-17-2007 08:04 AM In reply to

    Re: how to solve the problem with xpath

    Hi Shiva,

    I guess that his time calculation is already working and he want to receive now the person matich the maximum time value.

    Smileforest: If I am correct you just need to pick then the value from the previous node which is giving you the max time value.
    Listen to Motörhead cos they play Rock'n Roll :)
  • 01-17-2007 04:39 PM In reply to

    Re: how to solve the problem with xpath

    thanks Shiva and nukkumatti,yes,nukkumatti u are right,but the problem is how to find the previous node which is giving me the max time value?? i don't know how to write the correct xpath code. can u give me a hand??
    quote:
    Originally posted by nukkumatti

    Hi Shiva,

    I guess that his time calculation is already working and he want to receive now the person matich the maximum time value.

    Smileforest: If I am correct you just need to pick then the value from the previous node which is giving you the max time value.

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