Mobile forms - issue with X-path constraints

I am building a simple test application to explore the new features of version 4. I have a simple data structure where States/Regions are Linked to Countries, and these are both linked to a Company address record. In a regular form I can use the 'Constrained by...' functionality to limit the list of States/Regions to those matching the Country selected. As an alternative I can enter an x-path constraint like this in the Company record: [Contacts.Region_Country/Contacts.Country/Contacts.Company_Country = '[%CurrentObject%]'] In a new mobile form there doesn't seem to be any 'Constrained by...' option, and if I enter the x-path constraint above I get an error in the runtime when displaying a record: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"amount":-1,"sort":[],"formName":"","returnsCount":false,"offset":-1,"type":"RetrieveXPathSchemaRawAction","xpath":"//Contacts.Region[Contacts.Region_Country/Contacts.Country/Contacts.Company_Country = '[%CurrentObject%]']"}', all database changes executed by this action were rolled back at com.mendix.core.actionmanagement.CoreAction.c(SourceFile:515) Caused by: n: An exception has occurred for the following request(s): fu (depth = -1): //Contacts.Region[Contacts.Region_Country/Contacts.Country/Contacts.Company_Country = '[%CurrentObject%]'] at x.a(SourceFile:57) Caused by: java.lang.IllegalArgumentException: Global identifier should be a number (given value: [%CurrentObject%]) at ie.<init>(SourceFile:71) at com.mendix.core.Core.createMendixIdentifier(SourceFile:1864) at p.d(SourceFile:100) at r.d(SourceFile:76) at q.a(SourceFile) at ep.d(SourceFile:1242) at ep.a(SourceFile:808) at ep.a(SourceFile:389) at ep.a(SourceFile:167) at ep.a(SourceFile:140) at em.D(SourceFile:1018) at em.v(SourceFile:244) at em.a(SourceFile:143) at ep.a(SourceFile:1045) at ep.a(SourceFile:906) at ep.a(SourceFile:591) at ep.a(SourceFile:167) at ep.a(SourceFile:140) at em.D(SourceFile:1018) at em.v(SourceFile:244) at em.a(SourceFile:143) at dA.b(SourceFile:114) at dA.a(SourceFile:84) at dE.a(SourceFile:68) at x.a(SourceFile:43) at h.a(SourceFile:269) at hw.a(SourceFile:118) at hw.a(SourceFile:89) at hw.executeAction(SourceFile:28) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:57) at at gE.execute(SourceFile:302) at iW.a(SourceFile:285) at ja$g.a(SourceFile:126) at ja$g$a.a(SourceFile:118) at ja$g$a.apply(SourceFile:116) at$class.apply(Actor.scala:545) at ja$g.apply(SourceFile:112) at at akka.dispatch.MessageInvocation.invoke(MessageHandling.scala:25) at akka.dispatch.ExecutableMailbox$class.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:223) at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:123) at akka.dispatch.ExecutableMailbox$ at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$ at java.util.concurrent.ThreadPoolExecutor$Worker.runTask( at java.util.concurrent.ThreadPoolExecutor$ at at Do x-path constraints work differently in the mobile client?
1 answers

This is indeed a bug, the CurrentObject token in the constraint was ignored by the client. This is already fixed, and will be available in the next (patch) release.