Lookup closest date - InfoPath Dev
in

InfoPath Dev

Lookup closest date

Last post 09-29-2013 10:24 PM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-24-2013 06:46 AM

    Lookup closest date

    I have a list with a "effective date" column and an "amount" column. I want to auto-populate a field in the form with the most current rate. To do this, I'll need to lookup the closest date from the date I have in the form and populate with the amount. How can I perform that filter/lookup?
  • 09-29-2013 10:24 PM In reply to

     Assuming you are using an ordinary list connection, the formula would be something like this (I'm abbreviating here):

    SharePointListItem_RW[translate(substring(EffectiveDate, 1, 10), "-", "") >= translate(substring(FormDate, 1, 10), "-", "")]/Amount

     Note that in order for this to work, the connection would have to be sorting the results in order of the effective date (ascending).

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.