Data View filter not showing proper values in Expression Builder

Wappler Version: 6.2.1 Beta
Operating System: Windows 11
Server Model: Capactior
Database Type: SQLite

Expected behavior

The structure from the Data Source should be available in the Expression editor

I should see these columns as values based on the Data Source selected.

Actual behavior

No structure/fields from the Data Source are shown. I only see these values.

How to reproduce

  1. Create a Page Flow that has a SQLite Query
    image
  2. Create a Data View that uses the query from the Page Flow as the data source
    image
  3. Try to create a Filter using fields from the query

Bumping for assignment.

I tried to replicate your problem, but it was all working fine to me. I could see the query fields in the data view data source binding and pick them later on as filter.

Please restart Wappler with logging, reproduce the problem and attach the debug log. See:

Also are you on the stable of beta extensions channel?

Make sure you are on the beta channel and use the latest Wappler

The new Expression Builder is only in Beta channel. Logs attached.

wappler.zip (2.9 KB)

Another side effect is it wipes out existing expressions.

I’m getting a slightly different error after upgrading to v6.3.1 in Terminal.

RulesParseError: Incorrect data object passed 
at h.error (file:///C:/Users/Keith/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/UI/queryBuilder/js/query-builder.standalone.min.js:7:41529) 
at c.setRules (file:///C:/Users/Keith/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/UI/queryBuilder/js/query-builder.standalone.min.js:7:25326) 
at $.fn.queryBuilder (file:///C:/Users/Keith/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/UI/queryBuilder/js/query-builder.standalone.min.js:7:47260) 
at initQueryBuilder (file:///C:/Users/Keith/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/UI/dmxAppConnect/expression.htm?theme=dark&app=true&noinit=true:1178:17) 
at initUI (file:///C:/Users/Keith/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/UI/dmxAppConnect/expression.htm?theme=dark&app=true&noinit=true:661:5) 
at file:///C:/Users/Keith/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/dmxDWApiBridge/dmxNWApiBridge.js:7:24962

Seems to be specifically related to the data types you have in your SQLite query.

What database types are the columns you have there?

Really basic types on this table.

image

What does this in the logs mean?

[2024-02-29 07:00:31.468] no meta found for UserLabels in [
  {
    "sub": [
      {
        "type": "text",
        "name": "LabelId"
      },
      {
        "type": "text",
        "name": "Name"
      },
      {
        "type": "text",
        "name": "MessageListVisibility"
      },
      {
        "type": "text",
        "name": "LabelListVisibility"
      },
      {
        "type": "text",
        "name": "Type"
      },
      {
        "type": "number",
        "name": "MessagesTotal"
      },
      {
        "type": "number",
        "name": "MessagesUnread"
      },
      {
        "type": "number",
        "name": "ThreadsTotal"
      },
      {
        "type": "number",
        "name": "ThreadsUnread"
      },
      {
        "type": "text",
        "name": "TextColor"
      },
      {
        "type": "text",
        "name": "BackgroundColor"
      }
    ],
    "name": "query",
    "type": "array"
  }
]
[2024-02-29 07:00:31.469] _findActionStepFromExpression: ERROR PARSING: UserLabels.data.query: UserLabels is not defined
[2024-02-29 07:00:31.469] getRulePropertyDataExpressionSchema: No meta found for UserLabels.data.query with in base: 
[2024-02-29 07:00:31.474] OPEN popup: PopupWindow_1709208031473

Seems like the output meta data for the page flow can’t be found.

Could you check in dmxAppConnect/config.js under your page app id and then the page flow id, see what data is defined there? You can paste it here.

"UserLabels": {
      "meta": [
        {
          "sub": [
            {
              "type": "text",
              "name": "LabelId"
            },
            {
              "type": "text",
              "name": "Name"
            },
            {
              "type": "text",
              "name": "MessageListVisibility"
            },
            {
              "type": "text",
              "name": "LabelListVisibility"
            },
            {
              "type": "text",
              "name": "Type"
            },
            {
              "type": "number",
              "name": "MessagesTotal"
            },
            {
              "type": "number",
              "name": "MessagesUnread"
            },
            {
              "type": "number",
              "name": "ThreadsTotal"
            },
            {
              "type": "number",
              "name": "ThreadsUnread"
            },
            {
              "type": "text",
              "name": "TextColor"
            },
            {
              "type": "text",
              "name": "BackgroundColor"
            }
          ],
          "name": "query",
          "type": "array"
        }
      ],
      "local": {}
    },

So I created a brand new page flow that’s exactly the same as the UserLabels page flow. The meta in config.js looks exactly the same, but this one doesn’t have an issue, so there must be some other reference that’s causing the filter to not work.

"UserLabelsRedo": {
      "meta": [
        {
          "sub": [
            {
              "type": "text",
              "name": "LabelId"
            },
            {
              "type": "text",
              "name": "Name"
            },
            {
              "type": "text",
              "name": "MessageListVisibility"
            },
            {
              "type": "text",
              "name": "LabelListVisibility"
            },
            {
              "type": "text",
              "name": "Type"
            },
            {
              "type": "number",
              "name": "MessagesTotal"
            },
            {
              "type": "number",
              "name": "MessagesUnread"
            },
            {
              "type": "number",
              "name": "ThreadsTotal"
            },
            {
              "type": "number",
              "name": "ThreadsUnread"
            },
            {
              "type": "text",
              "name": "TextColor"
            },
            {
              "type": "text",
              "name": "BackgroundColor"
            }
          ],
          "name": "query",
          "type": "array"
        }
      ],
      "local": {}
    },

I just ran into a Wappler crash while troubleshooting – used automated reporting to report it. As a result it wiped out the config.js file.

the expression parsing will be fixed in the next update - but it was also related to the metadata from your query as it was no longer available. Might all be due to the missing config.js file.

When exactly did it went empty - what kind of crash you got - what was the last thing you saw or did?

I was changing the data source and saving when Wappler crashed. Prior to that the config.js showed all values as shown in the git compare.

It looks like this issue is related to the Data View component’s meta. It appears that is not writing its meta to the config.js in some instances.

I do a lot of editing through code view. I’ve also renamed components and duplicated them. So one or both of these actions appear to not update the config.js file. It’s only when I use the UI to update the Data Source that the meta is updated in config.js.

Is it possible for Wappler to watch the page file and update config.js on modification or on save? I mention this because I’m also seeing a lot of unnecessary items in config.js due to removing, renaming, and/or other actions that make certain meta data no longer necessary.

1 Like

Could explain that more in detail with screenshots?

I think this is all I did, but cannot be 100% certain.

  1. I clicked on lightening bolt.
    image

  2. I changed the Data Source to another Page Flow Data Query
    image

  3. Then I think I clicked CTRL+S to save

1 Like

This should be fixed in Wappler 6.3.2