# Need help with table component

**URL:** <https://forum.inductiveautomation.com/t/need-help-with-table-component/83067>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 13, 2023, 5:19am UTC](https://forum.inductiveautomation.com/t/need-help-with-table-component/83067 "2023-12-13T05:19:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Apxea](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Apxea](https://forum.inductiveautomation.com/u/Apxea)\
**Post date:** [December 13, 2023, 5:19am UTC](https://forum.inductiveautomation.com/t/need-help-with-table-component/83067/1 "2023-12-13T05:19:57Z")

</div>

I need help with table component.  
 ![スクリーンショット 2023-12-13 141424](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/2/826f6fd53e10a1df6042a9820a5a6c9c0216145e.png)  
This is my table.  
Can you tell me how to get the value from table.  
For example in the photo, when the user click on the first one and click copy button, it will store the image in main folder inside of ignition and show the image in Image component.

 ![スクリーンショット 2023-12-13 141650](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/1/01e29f47cee49ae5b1e382623b0cf5b35ab3ba4c.png)  
I did with the text field but I don't know how to do with table component.  
This is my python code for text field.  
def runAction(self, event):  
import shutil

#テキストフィールドに指定したファイルをIgnitionのWebサーバーにコピーする  
path1 = self.getSibling("TextField\_1").props.text  
path2 = r"C:\Program Files\Inductive Automation\Ignition\webserver\webapps\main"  
shutil.copy(path1, path2)

#################画像表示  
import os  
#ファイル名だけ取得  
basename = os.path.basename(path1)  
#ファイル名だけ取得して、/とかけあわせた物をsourceに入れる  
self.getSibling("Image\_4").props.source = '/' + (basename)

Can you tell me how can I do the same thing with table component.  
Thank you have a nice day

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 13, 2023, 6:46am UTC](https://forum.inductiveautomation.com/t/need-help-with-table-component/83067/2 "2023-12-13T06:46:56Z")

</div>

Assuming the Table and Button are siblings in the same Container, you could use this script to capture an image of the Table:

```auto
self.getSibling("TableNameHere").requestPrint("component", "ImageTitleHere")

```

This will save an image of the component to the CLIENT. To display the image file in the Image component, you need to upload the file saved on the client to the Gateway. This will require use of the File Upload component.

I suspect the only reason your script is working is because you're using the same machine for both Client and Gateway.

**Side note:**  
While you might find recommendations to save photos to the `webapps/main` directory here in the forums, that route is officially unsupported and could stop working at any point in the future without warning. Just because it works does not mean it is supposed to work. It's highly recommended you serve resources through either the WebDev module, a third-party module, or an external resource server (Photobucket/S3).

---

<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:** [December 13, 2023, 8:42am UTC](https://forum.inductiveautomation.com/t/need-help-with-table-component/83067/3 "2023-12-13T08:42:12Z")

</div>

Aung\_pyaesan, welcome to the forum. Please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

---

<div class="post-metadata">

**Author:** ![Apxea](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Apxea](https://forum.inductiveautomation.com/u/Apxea)\
**Post date:** [December 15, 2023, 7:37am UTC](https://forum.inductiveautomation.com/t/need-help-with-table-component/83067/4 "2023-12-15T07:37:47Z")

</div>

Thank you for your advice and solution.

---

<div class="post-metadata">

**Author:** ![Apxea](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Apxea](https://forum.inductiveautomation.com/u/Apxea)\
**Post date:** [December 15, 2023, 7:38am UTC](https://forum.inductiveautomation.com/t/need-help-with-table-component/83067/5 "2023-12-15T07:38:12Z")

</div>

Noted !
