# Downloading the transformed values from a perspective table

**URL:** <https://forum.inductiveautomation.com/t/downloading-the-transformed-values-from-a-perspective-table/63405>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [August 24, 2022, 5:39pm UTC](https://forum.inductiveautomation.com/t/downloading-the-transformed-values-from-a-perspective-table/63405 "2022-08-24T17:39:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [August 24, 2022, 5:39pm UTC](https://forum.inductiveautomation.com/t/downloading-the-transformed-values-from-a-perspective-table/63405/1 "2022-08-24T17:39:42Z")

</div>

If I have a dataset with integers that get transformed into their text equivalent using an embedded view in a perspective table, can I download the transformed values from a property or do I need to handle the transformation by myself again while doing the download to csv?

**Data in Table**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/c/0c0d071c19c57aed3a1debbc2a82fb05170c5613.png)

**Data on Display**  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/b/fb5b04cf0fcf765451d3dae4d692d3cecd526573.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/5/0598c6b1cf24a3f83fd965646b725291017f5f05.png)

**Data when downloaded (back to integers)**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/0/a070bded6f4b0e4d67d0d5fc6ccce6e8a9d58e2d.png)

Thanks,

Nick

---

<div class="post-metadata">

**Author:** ![YF129701](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/yf129701/32/60498_2.png) [@YF129701](https://forum.inductiveautomation.com/u/YF129701)\
**Post date:** [August 24, 2022, 6:33pm UTC](https://forum.inductiveautomation.com/t/downloading-the-transformed-values-from-a-perspective-table/63405/2 "2022-08-24T18:33:19Z")

</div>

The data is never not integers. I’m assuming you’re passing an integer into a view, using the parameter and displaying the text equivalent. If you use the dataset viewer, you’ll see the data never changes to your text equivalents. If you don’t mind the actual underlying data changing, you could update the appropriate cells with whatever text is in your embedded view. I wouldn’t recommend this and as soon as you refresh the binding, it’ll just retrieve integers from the DB again (I’m assuming that’s the setup).

Would you could do instead (what I would do) is to retrieve the laneDetail as text from the DB (if that’s where it’s coming from) using a `CASE` statement:

```sql
SELECT
    timestamp, 
    sorter,
    ...
    CASE laneDetail 
        WHEN 1 THEN 'Lane Full'
        WHEN 0 THEN 'Lane Empty'
    END laneDetailText
FROM
    <your_table>

```

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [August 24, 2022, 6:47pm UTC](https://forum.inductiveautomation.com/t/downloading-the-transformed-values-from-a-perspective-table/63405/3 "2022-08-24T18:47:11Z")

</div>

Why we don’t transform it at the time of query is because the data is then bigger across all transit (string vs. integer)

Nick

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 24, 2022, 6:54pm UTC](https://forum.inductiveautomation.com/t/downloading-the-transformed-values-from-a-perspective-table/63405/4 "2022-08-24T18:54:36Z")

</div>

A script transform would be more efficient (DB → GW) than embedded views, and fix the download problem.

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [August 24, 2022, 9:08pm UTC](https://forum.inductiveautomation.com/t/downloading-the-transformed-values-from-a-perspective-table/63405/5 "2022-08-24T21:08:13Z")

</div>

Thanks for the input gents. I ended up making a function that converts the target columns post query but before assigning the data to the perspective table.

Cheers,

Nick
