# Splitting long data fields over multiple lines in Data Window

**URL:** <https://discuss.saleae.com/t/splitting-long-data-fields-over-multiple-lines-in-data-window/1879>\
**Category:** Extensions\
**Created:** [October 24, 2022, 9:20pm UTC](https://discuss.saleae.com/t/splitting-long-data-fields-over-multiple-lines-in-data-window/1879 "2022-10-24T21:20:17Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![markgarrison](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/markgarrison/32/23_2.png) [@markgarrison](https://discuss.saleae.com/u/markgarrison)\
**Post date:** [October 28, 2022, 8:37pm UTC](https://discuss.saleae.com/t/splitting-long-data-fields-over-multiple-lines-in-data-window/1879/7 "2022-10-28T20:37:39Z")

</div>

Hi Steve,

First we don’t offer the ability to control the order of the columns yet, or the ability to order them in-app. It’s on our backlog, but unfortunately it will be a while before we can do another pass on the data table.

That said, you can hide columns you don’t want to see in the UI by using the right-click menu:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/2X/7/7ef51fe84db6b342f69911be8b33b9760c6052ff.png)

Second, about multiple frames. Here is a quick example showing an HLA producing multiple frames from a single input frame.

Here you can see the new frames in the output. Each of those 3 frames was produced from the single frame below it.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/2X/b/b45d5b76d7d88d51784bd60df203a00b82e649f9.png)

Here you can see them in the sidebar. For HLAs, there is exactly 1 row per `AnalyzerFrame` returned by your HLA.

Note - the frames you produce from your HLA must always be returned in time order, sorted by their start times. That is true both between calls to `decode()` as well as between frames returned by `decode()`, when returning more than one frame at a time, as shown here. Otherwise we’ll get undefined behavior in the app.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/2X/1/1a3bff794b20bed9aa42eb16b06d91df74053665.png)

You can see the source code below. the `decode()` function can return one of thee possible types:

- `None` indicating no frame should be produced
- `AnalyzerFrame`, indicating one frame is produced
- `List[AnalyzerFrame]` indicating multiple frames are produced, as shown below.

```nohighlight
from saleae.analyzers import HighLevelAnalyzer, AnalyzerFrame, StringSetting, NumberSetting, ChoicesSetting

class Hla(HighLevelAnalyzer):

    result_types = {
        'mytype': {
            'format': '{{data.original}} [{{data.subframe}}]'
        }
    }

    def __init__ (self):
        pass

    def decode(self, frame: AnalyzerFrame):
        gap = (frame.end_time - frame.start_time) / 10
        width = (frame.end_time - frame.start_time)/3

        time1 = frame.start_time
        time2 = time1 + width
        time3 = time2 + width
        time4 = time3 + width

        # Return the data frame itself
        frame1 = AnalyzerFrame('mytype', time1, time2 - gap, {
            'original': frame.data['data'],
            'subframe': 1
        })

        frame2 = AnalyzerFrame('mytype', time2, time3 - gap, {
            'original': frame.data['data'],
            'subframe': 2
        })

        frame3 = AnalyzerFrame('mytype', time3, time4, {
            'original': frame.data['data'],
            'subframe': 3
        })

        return [frame1, frame2, frame3]

```

---

_[View the full topic](https://discuss.saleae.com/t/splitting-long-data-fields-over-multiple-lines-in-data-window/1879)._
