# How to set case in Data Viewer Grid to open screen or open file PDF

**URL:** <https://community.thunkable.com/t/how-to-set-case-in-data-viewer-grid-to-open-screen-or-open-file-pdf/2845745>\
**Category:** Questions about Thunkable X\
**Tags:** screen, navigate-screen, data-viewer\
**Created:** [February 20, 2024, 6:58pm UTC](https://community.thunkable.com/t/how-to-set-case-in-data-viewer-grid-to-open-screen-or-open-file-pdf/2845745 "2024-02-20T18:58:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZakariaOUTALEB](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/zakariaoutaleb/32/170945_2.png) [@ZakariaOUTALEB](https://community.thunkable.com/u/ZakariaOUTALEB)\
**Post date:** [February 20, 2024, 6:58pm UTC](https://community.thunkable.com/t/how-to-set-case-in-data-viewer-grid-to-open-screen-or-open-file-pdf/2845745/1 "2024-02-20T18:58:40Z")

</div>

How to set case in Data Viewer Grid to open screen or open file PDF in new form thunkable

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [February 20, 2024, 7:58pm UTC](https://community.thunkable.com/t/how-to-set-case-in-data-viewer-grid-to-open-screen-or-open-file-pdf/2845745/2 "2024-02-20T19:58:55Z")

</div>

Hi and welcome to Thunkable!

Please review this: [How to ask Great Questions v2.0](https://community.thunkable.com/t/how-to-ask-great-questions-v2-0/2689983)

---

<div class="post-metadata">

**Author:** ![ZakariaOUTALEB](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/zakariaoutaleb/32/170945_2.png) [@ZakariaOUTALEB](https://community.thunkable.com/u/ZakariaOUTALEB)\
**Post date:** [February 22, 2024, 10:20am UTC](https://community.thunkable.com/t/how-to-set-case-in-data-viewer-grid-to-open-screen-or-open-file-pdf/2845745/3 "2024-02-22T10:20:57Z")

</div>

My problem is the one in the picture, but the latter is the one that applies  
I want each pressure to be applied to point me to another Screen, for example block 1 to the first Screen and so on until press 6 goes to Screen 6

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/b/0bee670772e085f8c6295c1e97061a854990a2e2.png)  
But when working on if-do, the latter applies  
The if-do-else won’t work

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [February 22, 2024, 6:31pm UTC](https://community.thunkable.com/t/how-to-set-case-in-data-viewer-grid-to-open-screen-or-open-file-pdf/2845745/4 "2024-02-22T18:31:05Z")

</div>

> [@ZakariaOUTALEB](#):
>
> The if-do-else won’t work

That is because you are not using if-do-else. And also because the row id refers to the row of the data source and you’re checking to see if the value in a cell. That doesn’t make any sense. What does it mean to say “if cell B3”?

What you need is the _index_ value which unfortunately the Data Viewer Grid’s Item Click block doesn’t have.

So you need to check if the `get value` equals the actual value in that cell in the data source. And if so, then navigate to a screen.

Stacking `if` blocks like you’ve done is not always the best idea. It will work in this case but if you truly want and if-else structure, then you can click the gear icon next to “if” to add an else or elseif block.

---

<div class="post-metadata">

**Author:** ![ZakariaOUTALEB](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/zakariaoutaleb/32/170945_2.png) [@ZakariaOUTALEB](https://community.thunkable.com/u/ZakariaOUTALEB)\
**Post date:** [February 22, 2024, 10:42pm UTC](https://community.thunkable.com/t/how-to-set-case-in-data-viewer-grid-to-open-screen-or-open-file-pdf/2845745/5 "2024-02-22T22:42:39Z")

</div>

Thank you, I solved it.  
I found the solution, I’ll put it here so that if someone comes back he will find it

---

<div class="post-metadata">

**Author:** ![ZakariaOUTALEB](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/zakariaoutaleb/32/170945_2.png) [@ZakariaOUTALEB](https://community.thunkable.com/u/ZakariaOUTALEB)\
**Post date:** [February 24, 2024, 4:08pm UTC](https://community.thunkable.com/t/how-to-set-case-in-data-viewer-grid-to-open-screen-or-open-file-pdf/2845745/6 "2024-02-24T16:08:24Z")

</div>

The solution is as in the picture, just select ItemClick from the Data Viewer Grid  
Then you put Vavigate to and choose from the interface’s Data source what suits you best, choose row id from the Data Viewer Grid and integrate it into the data source

Provided that in the picture the name in the table is the name of the screen you want to go to  
For example in the picture I have a row named “name” that contains all the names of screen’s

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/4/94af7491411c08537ef8b703faeaf71e1cf24633.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [May 24, 2024, 4:09pm UTC](https://community.thunkable.com/t/how-to-set-case-in-data-viewer-grid-to-open-screen-or-open-file-pdf/2845745/7 "2024-05-24T16:09:01Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
