# Ordered view.param object in Perspective

**URL:** <https://forum.inductiveautomation.com/t/ordered-view-param-object-in-perspective/72552>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 18, 2023, 3:25am UTC](https://forum.inductiveautomation.com/t/ordered-view-param-object-in-perspective/72552 "2023-04-18T03:25:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![user66](https://avatars.discourse-cdn.com/v4/letter/u/b487fb/32.png) [@user66](https://forum.inductiveautomation.com/u/user66)\
**Post date:** [April 18, 2023, 3:25am UTC](https://forum.inductiveautomation.com/t/ordered-view-param-object-in-perspective/72552/1 "2023-04-18T03:25:25Z")

</div>

Hi all,  
I have a view param object to which I'm assigning key : value pairs in a script but I want to preserve the order in which the key : value were assigned like in orderedDict in python.  
Is there a possible way of implementing this?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 18, 2023, 11:14am UTC](https://forum.inductiveautomation.com/t/ordered-view-param-object-in-perspective/72552/2 "2023-04-18T11:14:22Z")

</div>

No, the underlying java object is unordered.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 18, 2023, 11:33am UTC](https://forum.inductiveautomation.com/t/ordered-view-param-object-in-perspective/72552/3 "2023-04-18T11:33:01Z")

</div>

> [@user66](#):
>
> I want to preserve the order in which the key : value were assigned like in orderedDict in python.

Why, as a matter of interest?

---

<div class="post-metadata">

**Author:** ![user66](https://avatars.discourse-cdn.com/v4/letter/u/b487fb/32.png) [@user66](https://forum.inductiveautomation.com/u/user66)\
**Post date:** [April 18, 2023, 4:54pm UTC](https://forum.inductiveautomation.com/t/ordered-view-param-object-in-perspective/72552/4 "2023-04-18T16:54:05Z")

</div>

I have a perspective table in which I can make some selections. I want to store the selections in a parameter so that I can display it in a label. Also, I want to remove values when I unselect from the table. I was thinking of using an object instead or an array so that I can do the removal faster, but it does not preserve the order.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [April 18, 2023, 5:00pm UTC](https://forum.inductiveautomation.com/t/ordered-view-param-object-in-perspective/72552/5 "2023-04-18T17:00:28Z")

</div>

Can you not use the selection properties built into the perspective table?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/b/8bd02f501dfb9ff93d4495a2d09cd746f4a738d5.png)

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [April 18, 2023, 5:45pm UTC](https://forum.inductiveautomation.com/t/ordered-view-param-object-in-perspective/72552/6 "2023-04-18T17:45:56Z")

</div>

> [@user66](#):
>
> so that I can do the removal faster,

I doubt you'd see any difference
