Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when changing rows via js script #1

Open
Mocio89 opened this issue Jul 10, 2024 · 1 comment
Open

Error when changing rows via js script #1

Mocio89 opened this issue Jul 10, 2024 · 1 comment

Comments

@Mocio89
Copy link

Mocio89 commented Jul 10, 2024

Hi,
When i try to change the rows Property inside a Unified JS script, i get this error (TraceViewer):
session: 0024, trace: PROPERTY_SET Invoke failed (property='Screen->Items->Properties->rows', id=4, error=0x80000000)

Here is my code:

Screen.Items("SelettoreRicette").Properties.rows = [["a"], ["b"], ["c"], ["d"]];

Thanks
GiorgioT.

@David-PLC
Copy link
Owner

Hi,
I'm still working on the documentation but, anywaway, in order to send data to the CWC you need to convert your array into a string with "JSON.stringify()", the "Array" data type is not supported inside CWC's
So, to display the data you will need to :
Screen.Items("SelettoreRicette").Properties.rows = JSON.stringify([["a"], ["b"], ["c"], ["d"]]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants