Home > Forum > Forms > Problem with refreshing the data table field after changing the value of another field

Problem with refreshing the data table field after changing the value of another field
0

Hi,

I have a following problem. I've created a data table form field that downloads data from SQL query. In the where clause, I refer to the value of another ‘Criterion’ field on the form. The data table should display the data depending on the selected criterion. Unfortunately as I change the criterion, the table sometimes fails to refresh and displays the data for the previous criterion. How do I solve this problem?

I don't want to use an item list filed because there is a character limit for a field of multiple lines of text

Regards,
PAWEŁ

In reply to: Karol Częczek

Hi,
It's best to add a screenshot with a query in the attribute, then we will be able to say something more.

Regards.

select
try_cast(year as varchar(4)) as year
, column_1
, column_2
, column_3
, column_4
, column_5
from table
where criterion_id = convert(INT, 'criterion_form_field')
and entity_code= 'entity_form_field'

The problem does not occur with item list, where the query to initialise is the same.
The item list initialisation is set to change the criterion value and this works fine, but column 5 is a field of multiple lines of text which has a limit on the number of characters

Why does this not work for data table and data row?
How do I fix it or do it differently?

Regards

MVP
In reply to: Karol Częczek

Hi,
If the query looks like you describe, theoretically the data should change according to the change in the attribute data.

At least it works for me in my tests.

I am puzzled by this limitation you write about because the multi-text field is this ntext, meaning it can hold up to 2 GB of data,
so if this is where the problem is, maybe the data is not able to load due to the amount of data?

Regards.

Hi,

Regarding the issue:
I don't see an issue with statement either. Maybe you can active the diagnostic mode from the user avatar. It should display the executed SQL statement. This way you could check what was executed.

@Karol
If I remember correctly there was some bug when a check was added to the single line of text field to limit it 250 characters or so. This limit was also applied to multi line text field in an item list.

Best regards,
Daniel