Formula Throws Unsupported Error - InfoPath Dev
in

InfoPath Dev

Formula Throws Unsupported Error

Last post 04-06-2010 07:46 AM by Levski. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 04-02-2010 09:35 AM

    Formula Throws Unsupported Error

    Hello all,

    We are using InfoPath 2007 SP 2 with MOSS 2007 SP2.

    I have the following XPath as the default formula for a string:

    ../my:PurchasingSection/my:PurchasingTable/my:EventList[count(/my:myFields/my:PurchasingSection/my:PurchasingTable/my:EventList)]/my:EventDesc

    which basically sets the string value as being the EventDesc field of the last row in a repeating table - in short EventList[count(EventList)]/EventDesc

     This works fine in InfoPath but throws an incompatibility error when I upload to a MOSS Form Library.

     Any help would be greatly appreciated.

     Thanking you in advance.

  • 04-05-2010 06:58 AM In reply to

    Re: Formula Throws Unsupported Error

  • 04-05-2010 01:19 PM In reply to

    Re: Formula Throws Unsupported Error

     Hello Alec, thank you very much for responding.

     I am experimenting with your explanation and the sample files you kindly presented on your blog - unfortunately I am unable to adapt it properly to my needs (the main difference being that your rules are attached to a button within the repeating table).

     I am trying to achieve the same with a button I have created for submitting.

     All I basically want to do is create a rule(s) on the submit button that will set the value of field outside of the repeating table to the value of a field in the last of a repeating table.

     I have a repeating table called Events and my field is LastEvent.

     Any suggestions would be very welcome.

  • 04-05-2010 02:26 PM In reply to

    Re: Formula Throws Unsupported Error

    For your scenario it would be easier to add index field to the repeating section and then query the last record using max() function. To ensure that the last record always has the highest index number assign initial value of that "index" field using max() function also.

  • 04-05-2010 03:42 PM In reply to

    Re: Formula Throws Unsupported Error

    Hi - forgive me for being ignorant, I am very new to InfoPath (this thread is my first post).

     I can create a field in the repeating table and ensure the last one has the highest number by autonumbering it. However, as to querying it - I am still indexing i.e.MyRepeatingTable[Max(MyAutoNumberField)]/MyTargetField.

     Strangely, this does not cause the Design Checker to throw up any errors - however, it still does not work. It always fetches the first row.

  • 04-06-2010 02:12 AM In reply to

    Re: Formula Throws Unsupported Error

     I am really stuck on this guys - can what I want even be done or am I wasting my time?

  • 04-06-2010 06:26 AM In reply to

    Re: Formula Throws Unsupported Error

    I've uploaded new version of the template where the function you need already implemented.

  • 04-06-2010 07:10 AM In reply to

    Re: Formula Throws Unsupported Error

     Alec, thanks a lot for your efforts and your patience.

    Unfortunately, when I uploaded your form to a MOSS form library, I got the unsupported expression error (for the Get Value From the Last Field button rule).

  • 04-06-2010 07:31 AM In reply to

    Re: Formula Throws Unsupported Error

    Oops uploaded wrong version. Fixed. Check it again.

  • 04-06-2010 07:46 AM In reply to

    Re: Formula Throws Unsupported Error

     You're a legend, Alec. Thanks a lot. I can finish up my first form now :-)

    It remains to be seen how well InfoPath and I will get on considering all my work is browser based and looping through and referencing array items is a pretty common task. This no index limitation will take some working around. Having said that, I have looked through excellent your blog and found lots of helpful examples for future reference.

     Thanks again. 

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