Jump to content

Data table column rearrange


Flex727

Recommended Posts

  • MVP 2023

I have a large Data Table (Indexed) that I need to rearrange the columns. According to the online tutorial that can be done, but it doesn't explain how. It also doesn't seem to be addressed in the Help file. None of the common sense ways seem to work. Anyone know how to do this in UniLogic?

Link to comment
Share on other sites

  • MVP 2023

I try to Export struct to excel file + rearrange by insert blank rows and copy past or cut paste

(i tryed to add rows with column name and data type in *.xls manualy also) + import to struct .

Maybe it not simple but it works.

 

Another solution is to duplicate all Member in needed sequence and after duplicating delete all source Member.

This is not correct  Member = Member1 after duplicate.  But this method not need export import operation.

Link to comment
Share on other sites

  • MVP 2023
4 hours ago, kratmel said:

I try to Export struct to excel file + rearrange by insert blank rows and copy past or cut paste

That was the only solution I was able to come up with as well.  When I imported the Excel file it re-arranged my Test1 Struct and the column order in the data table changed.  I chose "Copy and Replace" on the import option.  I've attached the original export as well as my shuffled one.

Joe T.

DataTable.xls

DataTable1.xls

Link to comment
Share on other sites

Well, the re-ordering is not in the Data Table itself, but in the HMI elements (you can have 2 different views to the same table, one with only some columns visible and ordered in one way, and the other one in a different screen for example, with different columns and ordered differently).

Just place a Data Table element on  a screen, link it to a table, and open the "Columns Widths" property.

In that view, you have "Is Visible" checkbox for each column. You also have the last columns (without title). where hovering your mouse on a row will show a drag image (4 horizontal lines).

By dragging from it then you can drop it on a different index (you will see the orange line adorner), and this will re-order the columns for that widget.

Link to comment
Share on other sites

  • MVP 2023
8 hours ago, Saragani said:

the re-ordering is not in the Data Table itself, but in the HMI elements

I tested it,  in table on HMI rearrangement is possible.
But on this topic, we have developed a way to do this in the table STRUCTS.
It is very uncomfortable to look for the required column for comparison with another column.

Sometimes the table is not present and is not required on the HMI screen.
At least in visilogic it is possible to duplicate column to the desired position.

Perhaps creators can add this feature in future versions of the UniLogic.

Link to comment
Share on other sites

  • MVP 2023
9 hours ago, Saragani said:

Just place a Data Table element on  a screen, link it to a table, and open the "Columns Widths" property.

In that view, you have "Is Visible" checkbox for each column. You also have the last columns (without title). where hovering your mouse on a row will show a drag image (4 horizontal lines).

Thank you, @Saragani. Is this feature also available for the Web Server?

Link to comment
Share on other sites

I have successfully used Export Structs to get an XLS spreadsheet, shuffled its rows (fields) using Excel's Cut and Insert Cut Cells, then used Import Structs to overwrite the original struct.

I recommend saving a copy of the file beforehand, and not attempting to add, remove or rename any fields from Excel. I did indulge in some renaming which imported OK, but got a Delegate Error on recompiling - which spells death to the ULPR I think. Renaming struct fields seems fine if done within Unilogic.

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...