Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 80925

XPath query function "count"

$
0
0

Hi all,

I am trying to do the following.

There are two tables: OrderHead and OrderLine with an 1 to many relationship: one orderhead can have many orderline. An orderLine can have an orderType.

I have template grid with Orderlines. The orderlines shall meet two citeria 1) OrderLine shall be equal to a specific orderType 2) Display only orderLines, that do not have "siblings". In other words: OrderHead of selected orderLine shall have only one orderLine associated.

My approach is to select XPath as datasource with the following constraints

 1. [orderLine.orderType = 'type1']
 2. count(ModuleA.orderLine[ModuleA.orderLine_orderHead/ModuleA.orderHead/ModuleA.orderLine_orderHead/ModuleA.orderLine = 1])
  1. Works fine
  2. I get the error "missing EOF at 'count'. I have also tried:

    count(//ModuleA.orderLine[ModuleA.orderLineorderHead/ModuleA.orderHead/ModuleA.orderLineorderHead/ModuleA.orderLine = 1])

Any suggestions? Would be great!

Edit: I cannot use a microflow to retrieve the dataset, because I need to search function of the template grid


Viewing all articles
Browse latest Browse all 80925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>