Trying to set value in repeating table with Qrules - InfoPath Dev
in

InfoPath Dev

Trying to set value in repeating table with Qrules

Last post 06-13-2013 07:05 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-13-2013 03:05 AM

    • MrWilde
    • Top 500 Contributor
      Male
    • Joined on 12-29-2011
    • Brisbane, Australia
    • Posts 40

    Trying to set value in repeating table with Qrules

    Interesting issue get my stumped!

    using setvalue to set fields in repeating table from secondary data source, sharepoint list.

    Currently testing and have button that sets the 7 required fields for each day.

    Have count(preceding-sibling::my:DAYS1to7) + 1 to set the index of the rows

    trying this SetValue command

    concat("SetValue /xpath=/my:myFields/my:tsd/my:WEEKS/my:WEEK1/my:DAYS1to7/my:w1_personalLeave[../my:w1_day='", dayCount, "'] /value=", LEAVE_x0020_Hours[TSD_x0020_day = dayCount])

    I am setting a field to view and the [../my:w1_day='", dayCount, "'] turns too [../my:w1_day='1'] consecuteivley, no problem

    I have tested retireving details from the secondary data source

    xdXDocument:GetDOM("LEAVE Data list")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:TTL_x0020_Time_x0020_Sheet_x0020[../d:TSD_x0020_day = 2]

    No problem

    issue is if I try and run

    LEAVE_x0020_Hours[TSD_x0020_day = dayCount]

    will not work. returns BLANK

    Just to reiterate

    THIS WORKS - LEAVE_x0020_Hours[TSD_x0020_day = 2]

    THIS WORKS - dayCount

    THIS WILL NOT - LEAVE_x0020_Hours[TSD_x0020_day = dayCount]

    dont understand

     

    Filed under: ,
  • 06-13-2013 05:36 AM In reply to

    Re: Trying to set value in repeating table with Qrules

     What are the data types of TSD_x0020_day and dayCount?

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 06-13-2013 06:50 AM In reply to

    • MrWilde
    • Top 500 Contributor
      Male
    • Joined on 12-29-2011
    • Brisbane, Australia
    • Posts 40

    Re: Trying to set value in repeating table with Qrules

    Hey Ernesto

    TSD_x0020_day is NumberType from SharePointList

    dayCount is and integer

    I tried passing dayCount through number() just to make sure the data type was correct but same result

  • 06-13-2013 07:04 AM In reply to

    Re: Trying to set value in repeating table with Qrules

    If TSD_x0020_day is on the secondary data source, I think it might be a string, though.

    Try [number(TSD_x0020_day) = dayCount]

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 06-13-2013 07:05 AM In reply to

    Re: Trying to set value in repeating table with Qrules

     In your formula, it looks like you are wrapping your integer in single quotes - can you try w/out those?

    Hilary Stoupa

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