Grid Clearing Shortly After Load

I have a panel grid that I added to our supplier tracker that lists some fields from POHeader, I set the data view up with a parent child relationship on VendorNum. I can only get it to populate with data on load using the event AfterGetByID but then the grid clears shortly after loading.

Any thoughts on how to debug this behavior?

Are you using DevTools (F12) → Console → CTRL + ALT + 8 to enable debugging then run your customisation…

It will show you what’s clearing it. :slight_smile:

:notebook: Assuming this is Kinetic and you’re using Chrome or Edge

1 Like

Running Kinetic smart client. I was unaware of that command. I did just hook into a different event (panel card expand) that works as intended now.

2 Likes

I am having an identical issue that seems to have cropped up randomly on a previously working grid. I’m sure I made some kind of change without knowing it that caused it.

I have been digging through the dev tools network/console tabs and I cannot for the life of me figure out what is causing it. Have you seen this kind of issue before and if so, is there a common cause for it? I have removed all BAQ Options Where Clause items so there are no filters on the BAQ loading into the grid. I am at a complete loss.

I have a custom button that performs a refresh which works fine, but for whatever reason the initial loading with the panel card does not work. It shows the rows for an instant then clears the grid. I’ve been digging for like 8 hours and I can’t figure it out. Any ideas I could try?

Edit-
The only differences I see in the payload between the panel card expand auto load and my custom refresh is, the broken call has a “Virtualization” executionSetting, and has “PageSize” executionSetting values. My custom refresh seems to be empty in those areas and the only info is the BAQ ID.

Show me what youve got including any events youve created.

I would gladly-- what’s the best way to show you this?

Here is the initial (broken) panel grid card Load payload:

{"queryID":"POP_ASNHeader","executionParams":[{"ExecutionFilter":[],"ExecutionParameter":[],"ExecutionSetting":[{"Name":"PageSize","Value":80},{"Name":"PageNum","Value":1},{"Name":"NeedTotal","Value":"true"},{"Name":"Select","Value":"[Calculated_ASNID], [UD33_Date01], [UD33_Date03], [UD33_Number01], [UD33_Company], [UD33_Key1], [UD33_Key2], [UD33_ShortChar07], [Calculated_CountLines], [Calculated_SumQty], [UD33_ShortChar05]"}],"ExecutionValueSetItems":[],"ExtensionTables":[]},{"ExecutionFilter":[],"ExecutionParameter":[],"ExecutionSetting":[{"Name":"Select","Value":"[Calculated_ASNID], [UD33_Date01], [UD33_Date03], [UD33_Number01], [UD33_Company], [UD33_Key1], [UD33_Key2], [UD33_ShortChar07], [Calculated_CountLines], [Calculated_SumQty], [UD33_ShortChar05]"},{"Name":"Virtualization","Value":"{\"mode\":\"pageCount\",\"pageNumber\":1,\"pageSize\":80,\"pageCount\":3}"}],"ExecutionValueSetItems":[],"ExtensionTables":[]}]}

Here is the error response from the above payload:

{
    "returnObj": [
        {
            "Results": [],
            "Errors": [
                {
                    "ErrorType": "Error",
                    "ErrorText": "Bad SQL statement.\r\nReview the server event logs for details.",
                    "TableName": "",
                    "FieldName": "",
                    "ErrorRowIdent": "",
                    "CorrelationId": "71d8b975-1927-4ab5-a090-4f053094950a"
                }
            ],
            "ExecutionInfo": [
                {
                    "Name": "ExecutionTime",
                    "Value": "73.942"
                }
            ]
        },
        {
            "Results": [],
            "Errors": [
                {
                    "ErrorType": "Error",
                    "ErrorText": "Bad SQL statement.\r\nReview the server event logs for details.",
                    "TableName": "",
                    "FieldName": "",
                    "ErrorRowIdent": "",
                    "CorrelationId": "71d8b975-1927-4ab5-a090-4f053094950a"
                }
            ],
            "ExecutionInfo": [
                {
                    "Name": "ExecutionTime",
                    "Value": "73.942"
                }
            ]
        }
    ]
}

–
Here is the working Custom Refresh Button payload:

{"queryID":"POP_ASNHeader","executionParams":[{"ExecutionFilter":[],"ExecutionParameter":[],"ExecutionSetting":[],"ExecutionValueSetItems":[],"ExtensionTables":[]}]}

and here is the working successful response:

{
    "returnObj": [
        {
            "Results": [
                {
                    "UD33_Company": "PPS",
                    "UD33_Number01": 10100150.000000000,
                    "UD33_Number02": 421.000000000,
                    "UD33_ShortChar01": "11025",
                    "UD33_Date01": "2024-09-26T00:00:00",
                    "UD33_Date03": "2024-09-28T00:00:00",
                    "Calculated_ASNID": "ASN10100150",
                    "UD33_Key1": "10100150",
                    "UD33_Key2": "421",
                    "UD33_ShortChar07": "ABC123",
                    "Calculated_CountLines": 1,
                    "Calculated_SumQty": 3.000000000
                },
                {
                    "UD33_Company": "PPS",
                    "UD33_Number01": 10100149.000000000,
                    "UD33_Number02": 421.000000000,
                    "UD33_ShortChar01": "11025",
                    "UD33_Date01": "2024-09-25T00:00:00",
                    "UD33_Date03": "2024-09-25T00:00:00",
                    "Calculated_ASNID": "ASN10100149",
                    "UD33_Key1": "10100149",
                    "UD33_Key2": "421",
                    "UD33_ShortChar07": "asd321",
                    "Calculated_CountLines": null,
                    "Calculated_SumQty": null
                }
            ],
            "Errors": [],
            "ExecutionInfo": [
                {
                    "Name": "ExecutionTime",
                    "Value": "26.1849"
                }
            ]
        }
    ]
}

Here is the Custom refresh button event that works correctly:
image

→

I do not have any custom events tied to the panel card expand or other areas that would initially load the grid, it was working before just fine when you first expand the panel card. I have since then removed the previously working BAQ Option Where clause filter items in an attempt to fix the load, assuming those were somehow the issue. But to no avail.

Have you altered your columns on your BAQ?.

If you’re using the columns feature on the grid under provider model, empty those out. If they don’t match the baq. It has a melt down!

Just use the columns section under grid model…

Also, i found recently. If you’ve got complex queries with ctes and multiple union queries. It doesnt work at all. Theyve accepted this as a bug and will be fixed in 2024.2.x

1 Like

I wouldn’t call the BAQ complex by any stretch, but it does use inner sub queries with filters and inner joins to the top lvl to use as a custom filter by user ID and company so only certain records return. I just don’t understand why that wasn’t an issue before now.

And well, I did add the columns to the provider model columns after I started experiencing the issues in hopes it would fix it but made no difference. Let me empty those back out and see what happens. Thank you man!

edit- can confirm that removing the provider model columns did not change the behavior. Maybe it is the BAQ itself, I’m guessing something is not loaded when its executing like BAQ Constants for CurrentUserID etc… Maybe something like that-- could be a timing thing I don’t know.

Are you passing params? I have found the best way to handle BAQs.

Create a dataset to hold your baq data.

DataView: cdvDave and change the settings to baq and it will pull the columns in.

Drop an empty grid and under provider model add your dataview name at the top under skip all of the baq crap.

Then create your event either on field or column or event change to call your baq and populate your cdvDave.

Bing bong. You have data.

1 Like

OK WTF App Studio…

On a hunch from your reply, I went to the GRID columns (not the provider model columns), and removed the ShortChar05 and a calculated column that were the last 2 I added. And it fixed it… I have no explanation for why. They were working correctly before LOL. Oh well. You are absolutely the man, you triggered my brain somehow to try this. THANK YOU.

I will put a guide together tomorrow.

What are you hanging off to make it automated rather than button press.

Ill do params as well to show you.

1 Like

No parameters in the BAQ. Read only and just runs wide open.

No automation for loading the grid initially, I have the panel card grid “Expand at Runtime” setting set to TRUE and when I first click the tab containing the panel grid card, it loads.

Are the shortchar field from a union? Or subquery?

If so, its broke. Sorry man :rofl:

1 Like

The calculated field was! But I have another calculated field in there thats ALSO from the sub query and its working fine! Argh! Lmao

Kinetic is currently a
This Is Fine GIF by 100% Soft

2 Likes

I literally cannot believe after so many hours of troubleshooting that this stupid thing I did was the fix… Excuse me while I go punch myself in the face for a bit.

Cannot stress how grateful I am for your mind lol, without your reply about the columns I don’t think I would have ever tried this.

1 Like

It took me weeks to make them accept it as a bug. :joy:

1 Like