NaN value on either a default value or through rule - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

NaN value on either a default value or through rule

Last post 09-09-2014 12:09 PM by JeffVojtko. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-03-2014 07:09 AM

    NaN value on either a default value or through rule

    I am getting a NaN value in front of my desired test string. And, I can't seem to figure this one out.
    Here is my formula:
    concat(substring("Bad", 1, (ReportTitle != "BRKR" and ReportTitle != "")) * string-length("Bad"), substring(concat(substring-before(UserIDNew, ";"), ",", substring(Action, 1, 1), ",", ReportTitle), 1, (ReportTitle = "BRKR" and ReportTitle != "") * string-length(concat(substring-before(UserIDNew, ";"), ",", substring(Action, 1, 1), ",", ReportTitle))))

    What I would like is to get a string like this:
    BBC,A,BRKR

    But, what I am getting is
    NaNBBC,A,BRKR

    The field types are:
    ReportTitle - String
    UserIDNew - String
    Action - string
    Jeffrey J Vojtko
  • 09-03-2014 11:47 AM In reply to

    Re: NaN value on either a default value or through rule

    Figured it out

    Had a misplaced parenthesis

    concat(substring("Bad", 1, (ReportTitle != "BRKR" and ReportTitle != "") * string-length("Bad")), substring(concat(substring-before(UserIDNew, ";"), ",", substring(Action, 1, 1), ",", ReportTitle), 1, (ReportTitle = "BRKR" and ReportTitle != "") * string-length(concat(substring-before(UserIDNew, ";"), ",", substring(Action, 1, 1), ",", ReportTitle))))
    Jeffrey J Vojtko
  • 09-09-2014 12:09 PM In reply to

    Re: NaN value on either a default value or through rule

    Got the code fixed. See Below: concat(substring("", 1, (not(starts-with(ReportTitle, "BRKR") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "CAPSJ243") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "CLNKJ020") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "DISAXTOP") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "FLXPJ") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "IAARJ") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "IALDJ") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "IAPSJ") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "IADSJ") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "IACO") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "IACPJ") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "IAPVJ") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "IATXJ") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "MKURJ522") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "PRPAJ") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "RXSCJ") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "RXSMJ") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "REVAJ") and ReportTitle != "" and contains(Media, "View")) or not(starts-with(ReportTitle, "PRPEJ") and ReportTitle != "" and contains(Media, "View")) or not(contains(Media, "View"))) * string-length("")), substring(concat(substring-before(UserIDNew, ";"), ",", substring(Action, 1, 1), ",", ReportTitle), 1, ((starts-with(ReportTitle, "BRKR") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "CAPSJ243") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "CLNKJ020") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "DISAXTOP") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "FLXPJ") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "IAARJ") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "IALDJ") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "IAPSJ") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "IADSJ") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "IACO") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "IACPJ") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "IAPVJ") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "IATXJ") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "MKURJ522") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "PRPAJ") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "RXSCJ") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "RXSMJ") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "REVAJ") and ReportTitle != "" and contains(Media, "View")) or (starts-with(ReportTitle, "PRPEJ") and ReportTitle != "" and contains(Media, "View"))) * string-length(concat(substring-before(UserIDNew, ";"), ",", substring(Action, 1, 1), ",", ReportTitle))))
    Jeffrey J Vojtko
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.