MVP 2023 Flex727 Posted February 8, 2019 MVP 2023 Report Posted February 8, 2019 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?
MVP 2023 kratmel Posted February 8, 2019 MVP 2023 Report Posted February 8, 2019 Duplicate column to new position + delete column+ rename new column. Export to excel file + rearrange + import to Data Table .
MVP 2023 Flex727 Posted February 8, 2019 Author MVP 2023 Report Posted February 8, 2019 4 minutes ago, kratmel said: Duplicate column to new position + delete column+ rename new column. Adding or duplicating always adds to the end. Am I missing something?
MVP 2023 kratmel Posted February 8, 2019 MVP 2023 Report Posted February 8, 2019 Sorry it was applicable only in standard (visilogic like non indexed) Data table. Maybe create new DTI with diferent column arangement and use LF: Copy Column to Column in DTI.
MVP 2023 Flex727 Posted February 8, 2019 Author MVP 2023 Report Posted February 8, 2019 1 minute ago, kratmel said: use LF: Copy Column to Column in DTI. It's not the data in the table I'm concerned with. I just want the table itself rearranged. It's large and complex and I don't want to have to create it over again.
MVP 2023 kratmel Posted February 9, 2019 MVP 2023 Report Posted February 9, 2019 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.
MVP 2023 Joe Tauser Posted February 9, 2019 MVP 2023 Report Posted February 9, 2019 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
MVP 2023 Flex727 Posted February 9, 2019 Author MVP 2023 Report Posted February 9, 2019 6 hours ago, Joe Tauser said: That was the only solution I was able to come up with as well. Thank you both @kratmel and @Joe Tauser - that seemed to work.
Saragani Posted February 10, 2019 Report Posted February 10, 2019 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.
MVP 2023 kratmel Posted February 10, 2019 MVP 2023 Report Posted February 10, 2019 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.
MVP 2023 Flex727 Posted February 10, 2019 Author MVP 2023 Report Posted February 10, 2019 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?
Robin P Posted February 13, 2019 Report Posted February 13, 2019 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.
Oldskuler Posted April 22, 2019 Report Posted April 22, 2019 You can simply do that in Properties Window of your Data Table, under Columns widths (Colection). It is a drag and drop option. Cheers, Petar
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now