# Save PDF file into PEGA DB

**URL:** <https://forums.pega.com/t/save-pdf-file-into-pega-db/4793>\
**Category:** Blueprint and App Design\
**Tags:** low-code-app-development, 8-7, dev-designer-studio, healthcare-and-life-sciences, system-architect\
**Created:** [July 19, 2023, 8:17am UTC](https://forums.pega.com/t/save-pdf-file-into-pega-db/4793 "2023-07-19T08:17:59Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eranda\_Weerasingha](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/eranda_weerasingha/32/23633_2.png) [@Eranda\_Weerasingha](https://forums.pega.com/u/Eranda_Weerasingha)\
**Post date:** [July 19, 2023, 8:17am UTC](https://forums.pega.com/t/save-pdf-file-into-pega-db/4793/1 "2023-07-19T08:17:59Z")

</div>

Hi team,

I have PDF file which user attached file , I want to save that pdf file in to Pega Database (Table Name - PatienReport) After user click submit button.

How can I config thease senario.

---

<div class="post-metadata">

**Author:** ![Anoop\_Krishna](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/anoop_krishna/32/23458_2.png) [@Anoop\_Krishna](https://forums.pega.com/u/Anoop_Krishna)\
**Post date:** [July 19, 2023, 8:30am UTC](https://forums.pega.com/t/save-pdf-file-into-pega-db/4793/2 "2023-07-19T08:30:28Z")

</div>

@Eranda10274 pdf file will be already stored in pega dB-\> data-workattach-file.

In your Patient Report DB, you just need to store the case id against the patient name.

For eg:-

Patient name -\>Philip

Case id → C- 45

So if user wants to search for pdf attached to Philip,

You first need to get case id of that patient from PatientReport DB, then using that case id you can get attachments linked to that case id using ootb data page.

Ootb dpage-\> D\_AttachmentList

---

<div class="post-metadata">

**Author:** ![Eranda\_Weerasingha](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/eranda_weerasingha/32/23633_2.png) [@Eranda\_Weerasingha](https://forums.pega.com/u/Eranda_Weerasingha)\
**Post date:** [July 19, 2023, 11:38am UTC](https://forums.pega.com/t/save-pdf-file-into-pega-db/4793/3 "2023-07-19T11:38:33Z")

</div>

Hi @Anoop Krishna

That Datapage ask 2 paramiter

1.LinkRefFrom

2.IncludeDocAttachments, can you tell me what is this two paramiters ?

---

<div class="post-metadata">

**Author:** ![Anoop\_Krishna](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/anoop_krishna/32/23458_2.png) [@Anoop\_Krishna](https://forums.pega.com/u/Anoop_Krishna)\
**Post date:** [July 19, 2023, 12:36pm UTC](https://forums.pega.com/t/save-pdf-file-into-pega-db/4793/4 "2023-07-19T12:36:48Z")

</div>

@Eranda10274 linkfrom is pzinskey of case id. Other parameter is not required. Please run the dpage standalone, you will be able to see the attachments attached to the case.

---

<div class="post-metadata">

**Author:** ![Eranda\_Weerasingha](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/eranda_weerasingha/32/23633_2.png) [@Eranda\_Weerasingha](https://forums.pega.com/u/Eranda_Weerasingha)\
**Post date:** [July 19, 2023, 3:02pm UTC](https://forums.pega.com/t/save-pdf-file-into-pega-db/4793/5 "2023-07-19T15:02:34Z")

</div>

Thank you @Anoop Krishna

---

<div class="post-metadata">

**Author:** ![Eranda\_Weerasingha](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/eranda_weerasingha/32/23633_2.png) [@Eranda\_Weerasingha](https://forums.pega.com/u/Eranda_Weerasingha)\
**Post date:** [July 20, 2023, 3:49am UTC](https://forums.pega.com/t/save-pdf-file-into-pega-db/4793/6 "2023-07-20T03:49:38Z")

</div>

Hi @Anoop Krishna,

One thing I want to know, To save pdf file into Pega DB, should I execute the activity or any other action ?, In my application when I’m choose file form my computer and submit that file not save Into pega DB (data-workattach-file)

---

<div class="post-metadata">

**Author:** ![Anoop\_Krishna](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/anoop_krishna/32/23458_2.png) [@Anoop\_Krishna](https://forums.pega.com/u/Anoop_Krishna)\
**Post date:** [July 20, 2023, 4:05am UTC](https://forums.pega.com/t/save-pdf-file-into-pega-db/4793/7 "2023-07-20T04:05:21Z")

</div>

@Eranda10274 please check if you are using AttachContent control. If you are using filepath control or any widget it works different way.

---

<div class="post-metadata">

**Author:** ![SunilC](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@SunilC](https://forums.pega.com/u/SunilC)\
**Post date:** [July 20, 2023, 8:57am UTC](https://forums.pega.com/t/save-pdf-file-into-pega-db/4793/8 "2023-07-20T08:57:50Z")

</div>

@Eranda10274 1 entry in Data-work-attach file table, 1 entry in Link-attachment table to link the attachment file to the case.

---

<div class="post-metadata">

**Author:** ![Eranda\_Weerasingha](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/eranda_weerasingha/32/23633_2.png) [@Eranda\_Weerasingha](https://forums.pega.com/u/Eranda_Weerasingha)\
**Post date:** [July 20, 2023, 4:40am UTC](https://forums.pega.com/t/save-pdf-file-into-pega-db/4793/9 "2023-07-20T04:40:12Z")

</div>

@Anoop Krishna I’m using AttachmentControl for that

---

<div class="post-metadata">

**Author:** ![Anoop\_Krishna](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/anoop_krishna/32/23458_2.png) [@Anoop\_Krishna](https://forums.pega.com/u/Anoop_Krishna)\
**Post date:** [July 20, 2023, 5:16am UTC](https://forums.pega.com/t/save-pdf-file-into-pega-db/4793/10 "2023-07-20T05:16:17Z")

</div>

@Eranda10274 can you once check clipboard for pyattachments pagelist property? Also application rule

Application-\> integration and security-\> content storage

---

<div class="post-metadata">

**Author:** ![Eranda\_Weerasingha](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/eranda_weerasingha/32/23633_2.png) [@Eranda\_Weerasingha](https://forums.pega.com/u/Eranda_Weerasingha)\
**Post date:** [July 20, 2023, 7:04am UTC](https://forums.pega.com/t/save-pdf-file-into-pega-db/4793/11 "2023-07-20T07:04:41Z")

</div>

@Eranda_Weerasingha my mistake, I’m using filepath controller

 ![fp.png](https://pega1.discourse-cdn.com/pega/original/2X/5/5a7380d50e4dc7241c4d920296756dfcb9b1e453.png)
