Skip to content

LISTVIEW DataSource WHERE does not support multiple XPath predicates [cond1][cond2] #144

@engalar

Description

@engalar

Description

When using LISTVIEW (or DATAGRID) with DataSource: DATABASE FROM ... WHERE, multiple XPath predicates in the standard [cond1][cond2] syntax cause a parse error.

Steps to Reproduce

CREATE SNIPPET MyModule.MySnippet (
  Params: { $Message: ConversationalUI.Message },
  Folder: 'Chat'
) {
  LISTVIEW lv (
    DataSource: DATABASE FROM ConversationalUI.ToolMessage
      WHERE [ConversationalUI.SubMessage_Message = '[%CurrentObject%]'][ToolCallStatus != 'ExecutedHidden'],
    Class: 'listview-hide-on-empty'
  ) {
    DYNAMICTEXT txt (Content: '{1}', ContentParams: [{1} = Title])
  }
}

Error

line 18:73 mismatched input '[' expecting {',', ')'}

The parser rejects the second [...] predicate block.

Expected Behavior

Multiple XPath predicates should be supported, matching standard Mendix XPath syntax: [cond1][cond2].

Workaround

Combine into a single predicate is not possible with and for all cases. Currently relying on entity access rules to filter instead.

-- Works (single predicate)
WHERE [ConversationalUI.SubMessage_Message = '[%CurrentObject%]']

-- Fails (two predicates)
WHERE [ConversationalUI.SubMessage_Message = '[%CurrentObject%]'][ToolCallStatus != 'ExecutedHidden']

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions