cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Can not save the changed values on the Advance Grid feature

DEV,YIDE,yoshi
6-Contributor

Can not save the changed values on the Advance Grid feature

I cannot change the value of INFOTABLE during the Advance Grid feature of Thingworx 9.2.0.

 

The operation as follows;

1 create  a DataShape for INFOTABLE.

2 create a ThingShape includes INFOTABLE  properties defined by the created DataShape.

3 Create Thing and set default values in INFOTABLE properties.

4 Create a Mashup with Advance Grid Widget as follows.

  (1) Bind INFOTABLE to Data of Advance Grid Wiget by getProperties service.

 (2) set all columns to be editable on the setting grid column of Advance Grid Widget context menu.

 (3) check EnableEditButtons in Property tab of Advance Grid Widget,

5 show created widjet.

6 click the edit button.

7 change values of cells.

8 click the save button.

9 Chaned values are displyed on the grid, at this point, looks so good!

10  click edit button again.

11  cells are not changed.(same as default values)

Please show me something wrong.

Regards,

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @DEV,YIDE,yoshi 

 

I can see the values are updating in DataTable. 

 

So here is the flow :

1. On Mashup open, Data loads from Property InfoTable

2. On Grid once value are updated. Data getting stored in DataTable

3. On Reload on Mashup, it will display Property InfoTable value only. Because you are updating DataTable not Property

 

I have added one more grid to compare DataTable Data and Grid Data. PFA

 

/VR

View solution in original post

15 REPLIES 15

Hi @DEV,YIDE,yoshi 

 

Could you please post your Mashup Binding screenshot

 

/VR

Hi, Velkumar

Sorry for the late reply. The screenshot is as follows.

DEVYIDEyoshi_0-1696899627644.png

Regards,

 

 

Hi @DEV,YIDE,yoshi 

 

Based on the EditCellCompleted event from the grid I'm able to update values in DataTable. Please check trigger event for "AddOrUpdateDataTableEntries" service in your Mashup.

 

Velkumar_0-1696919108138.png

 

I have also attached sample entities for your reference.

 

/VR

 

Thanks, your information, but  I could not find out "EditedData" in the widget context menu as below;

Something wrong? 

And an  attached file "UpdateGridSample" is not imported by error message "Entity import failed" at "Application Log".

Regards;

 

DEVYIDEyoshi_0-1696926272675.png

 

PS; the current version: Thingworx 9.2.0

 

 

Hi @DEV,YIDE,yoshi 

 

Please find entities developed in Thingworx 9.2

 

No that is completely fine. You can pass EditedTable to AddOrUpdateDataTableEntries service

 

Velkumar_0-1696929909878.png

 

/VR

 

 

Hi, Velkumar,

 

Thank you for your advice.

I changed the "EnableEditButtons TRUE" from "isEditable" to clear the edit operation.

please check the following the binding screenshot.

DEVYIDEyoshi_2-1697011900514.png

 

The operation and results as follows;

(1) Click "Edit" button, "Add", "Save" and "Cancel" buttons are appeared at the same location.

(2) Add a row data like "A", "1", "c"

(3) Click "Save" button.

(4) The added row is cleared, also no data in INFOTABLE in DATA TABLE thing.

(5) But it looks like work well at the screen log like below.

(6) This is correct or something wrong? Or I need add the create new service for "Edit Completed " event?

 

DEVYIDEyoshi_1-1697011426605.png

by the way, I am tring to import your file.(Sorry it takes time to understand!)

 

 

 

 

 

binding screen shot as follows;

DEVYIDEyoshi_0-1697012569124.png

PS; same as previous replied.

 

Hi @DEV,YIDE,yoshi 

 

It should be "EditCellCompleted' not 'EditCompleted'

 

/VR

Hi, Velkumar

(1) changed the property "IsEditable TRUE" from EditEnableBottton TRUE".

(1)  changed to "EditCellCompleted" from "EditCompleted"".

(2) changed the cell value from "1" to "1111".

(3) check  Infortable value of DataTable.

(4) it is not changed.

Regards,

Hi @DEV,YIDE,yoshi 

 

If possible could you please share your entities

 

/VR

Hi, Velkumar

Please check the attached 3 files.

 

regards,

Hi @DEV,YIDE,yoshi 

 

I can see the values are updating in DataTable. 

 

So here is the flow :

1. On Mashup open, Data loads from Property InfoTable

2. On Grid once value are updated. Data getting stored in DataTable

3. On Reload on Mashup, it will display Property InfoTable value only. Because you are updating DataTable not Property

 

I have added one more grid to compare DataTable Data and Grid Data. PFA

 

/VR

Hi, Velkumar

Thank you so much for your advice and your time to give me.

Now Really, I understood INFOTABLE and DATATABLE are completely different.

 

So I change the service from "getProperties" to "getDataTableEntries" to show data.

Now I can change and see the chaged  values after reread Web browser

DEVYIDEyoshi_1-1697116002332.png button.

 

May I ask a completely different question as bellow?

(1) I delete the all Infotable Property in gridDataTable in my sample Entity.

(2) Still I can see the all of records, that's not strange because now I reffer the Datatable not property.

So, my question is "How to initialize(reset) the related DataTable"

 

if you have a time, please show me how to resolve it.

Best Regards,

 

 

 

 

 

 

 

 

Hi @DEV,YIDE,yoshi 

 

You can use PurgeDataTableEntries Service to completely clean / reset DataTable. 

Please refer this link for DataTable Services - https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Composer/DataStorage/DataTables/DataTableServices.html

 

/VR

Hi, Velkmar

Thank you so much for your suggestion.

Everything cleared about my problem.

Thank you Again!

Regards,

Top Tags