# Using an argument(s) with the view function?

**URL:** <https://forum.inductiveautomation.com/t/using-an-argument-s-with-the-view-function/65245>\
**Category:** 3rd Party Modules\
**Tags:** ignition81\
**Created:** [October 14, 2022, 6:34pm UTC](https://forum.inductiveautomation.com/t/using-an-argument-s-with-the-view-function/65245 "2022-10-14T18:34:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [October 14, 2022, 6:34pm UTC](https://forum.inductiveautomation.com/t/using-an-argument-s-with-the-view-function/65245/1 "2022-10-14T18:34:49Z")

</div>

Paging @pturmel

I am trying to use a view with a where statement that is looking to a custom root container property.

Currently my expression is  
`view("SELECT * WHERE someColumn=args0",{Root Container.initialDataset}, {Root Container.idx})`  
but this is not working. I'm not sure the correct syntax - I can't find it in the documentation or an example in the demo project. How can I use my `Root Container.idx` in the pseudo SQL here?

---

<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:** [October 14, 2022, 6:38pm UTC](https://forum.inductiveautomation.com/t/using-an-argument-s-with-the-view-function/65245/2 "2022-10-14T18:38:45Z")

</div>

Looks like `args[0]`:  
[https://www.automation-pros.com/simaids/doc/expression.objectscript.html](https://www.automation-pros.com/simaids/doc/expression.objectscript.html)  
[https://www.automation-pros.com/simaids/doc/expression.view.html](https://www.automation-pros.com/simaids/doc/expression.view.html)

> The Where clause may use the munged names of the source columns, objects normally present in the local scope (system.\*, etc.), the "args" and "binding" objects as described in the [objectScript](https://www.automation-pros.com/simaids/doc/expression.objectscript.html) expression function, and "\_r", the row index in the source dataset.

---

<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:** [October 14, 2022, 7:17pm UTC](https://forum.inductiveautomation.com/t/using-an-argument-s-with-the-view-function/65245/3 "2022-10-14T19:17:39Z")

</div>

Yup, args is a tuple.
