"The som expression '$. for the dataRef specified on field 'field', resolved to an incompatible... | Community
Skip to main content
Level 3
March 14, 2014
Solved

"The som expression '$. for the dataRef specified on field 'field', resolved to an incompatible...

  • March 14, 2014
  • 13 replies
  • 7475 views

Node type of dataGroup, is what follows that error.

It's strange, every single field is mapped just fine, it only happens with a particular one.

Any ideas?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by _Bruce_Robertson

Hi,

I'm having trouble viewing your form in Designer, I'm guessing it is because you have ES4 and I only have ES3.  But there does seem to be an unnamed subform under cuentaCitionePlus just after TextField7 which is also bound to $.accountDetail.interestDueAmount.value.  This creates a dataGroup object as it was not in the sample XML used to create the data connection (notice that it is greyed out in the data view palette), so when the field "Intereses proyectados a fin de mes" then tries to bind it will find the dataGroup object (not a dataValue).

Regards

Bruce

13 replies

Magus069
Level 10
March 14, 2014

Do you know which line is causing the error... if you specify a resolveNode(), it might be because your somExpression is wrong...

Level 3
March 14, 2014

The error only happens when I try to bind to a specific xml node, that is similar to everyone else.

Does not matter the field I try to bind to, that's why I'm confused.

What confuses me more, is that if I make an intentional typo, there is no error, the value is just not mapped, and everything runs without problem, but when I match the value of the node, that is when the error happens (in this particular field)

For example, the error occurs when I map my textField to:

<interestDueAmount>

                                <currencyCode>COP</currencyCode>

                                <value>222</value>

</interestDueAmount>

If I do (in the Binding section) $.accountDetail.interestDueAmount.value -> I have the previous error.

If I do $.accountDetail.interestDueAmount.asd -> no error, no mapping of course but I have no errors either.

So, I'm confused

Magus069
Level 10
March 14, 2014

try the following

$.accountDetail.interestDueAmount.value.text.value

Level 3
March 14, 2014

That throws no error, but there is no mapping either.

Level 3
March 14, 2014

Alright this is weird, if I change the tag in the xml just a bit, let say, I add one letter in some part, it works.

It is like that particular word interestDueAmount conflicts somehow with something else...

_Bruce_Robertson
Level 10
March 15, 2014

Hi,

The error trying to saying you are binding a field in your form to a group element in your data connection.  In your example interestDueAmount is a group element (or complex type) and is represented in your data connection as a dataGroup object.  Subforms can be bound to dataGroup objects but fields can't.

I think the binding should be just  $.accountDetail.interestDueAmount (that is without the ".value")

Bruce

Level 3
March 15, 2014

But.. I use the same method for retrieving data all over my form, and it works just fine, for example:

<currentBalance>

                                <currencyCode>COP</currencyCode>

                                <value>222155</value>

                              </currentBalance>

I use $.accountDetail.currentBalance.value  -> and it works perfectly.


_Bruce_Robertson
Level 10
March 15, 2014

Hi,

I think I misunderstood your problem, is it possible for you to publish your form and data somewhere and add a link to it here in this thread so we can see what is happening?

Bruce

Level 3
March 15, 2014

Sure, I sent you a PM with a link containing both files, the .xdp and the xml data.

Thanks Bruce!.

_Bruce_Robertson
_Bruce_RobertsonAccepted solution
Level 10
March 16, 2014

Hi,

I'm having trouble viewing your form in Designer, I'm guessing it is because you have ES4 and I only have ES3.  But there does seem to be an unnamed subform under cuentaCitionePlus just after TextField7 which is also bound to $.accountDetail.interestDueAmount.value.  This creates a dataGroup object as it was not in the sample XML used to create the data connection (notice that it is greyed out in the data view palette), so when the field "Intereses proyectados a fin de mes" then tries to bind it will find the dataGroup object (not a dataValue).

Regards

Bruce