eval function doesnt work ! grrrr - InfoPath Dev
in

InfoPath Dev

eval function doesnt work ! grrrr

Last post 11-17-2010 01:35 AM by milko. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-15-2010 01:01 AM

    • milko
    • Top 500 Contributor
    • Joined on 11-12-2010
    • Posts 28

    eval function doesnt work ! grrrr

    i'm not able to use eval function because of a error while infopath check the formula. is seems that the problem occur in the second argument, probably infopath wasnt able to solve the correct xpath.
    what can i do ?

    valutazione(data; "valore - 40")

    data is a repeated section of a second connection and valore is a field of the same second connection.
    below the error:

    Tipo di valore previsto: ,

    Valore effettivo: nome
    valutazione(xdXDocument:GetDOM("Fogliazioni_GDV_con_mese_e_giorno")/tutto/date/data, "xdXDocument:GetDOM("-->Fogliazioni_GDV_con_mese_e_giorno<--")/tutto/date/data/dati_fogliazione/tot_pagine_giornale/valore - 40")

  • 11-15-2010 04:27 AM In reply to

    • milko
    • Top 500 Contributor
    • Joined on 11-12-2010
    • Posts 28

    Re: eval function doesnt work ! grrrr

    eheheh i ask and reply.

    infopath seems to have a problem with double quotes. substituting double quotes with single quote all works fine:
    valutazione(data; 'valore - 40')


     

  • 11-15-2010 08:42 AM In reply to

    Re: eval function doesnt work ! grrrr

    The problem was that you have string value starting here with double quotes:

    /data, -->"<--xdXDocument:GetDOM("Fogliazioni_GDV_con_mese_e_giorno")/tutto/date/data/dati_fogliazione/tot_pagine_giornale/valore - 40")

    then it finds another pair of double quotes here:

    /data, "xdXDocument:GetDOM(-->"<--Fogliazioni_GDV_con_mese_e_giorno")/tutto/date/data/dati_fogliazione/tot_pagine_giornale/valore - 40")

    and thinks the string is finished, even though it's not.  If you need to use a string-within-a-string, you need to nest single quotes inside of double quotes, and double quotes inside of single quotes, so this would be fine:

    "xdXDocument:GetDOM('Fogliazioni_GDV_con_mese_e_giorno')/tutto/date/data/dati_fogliazione/tot_pagine_giornale/valore - 40"

    and this would be fine too:

    'xdXDocument:GetDOM("Fogliazioni_GDV_con_mese_e_giorno")/tutto/date/data/dati_fogliazione/tot_pagine_giornale/valore - 40'

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-17-2010 01:35 AM In reply to

    • milko
    • Top 500 Contributor
    • Joined on 11-12-2010
    • Posts 28

    Re: eval function doesnt work ! grrrr

    :-) grazie

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