33
Views
11
Comments
Solved
[PDFSharp - Fillable PDF] Troubleshooting PDF_FileIN
pdfsharp-fillable-pdf
Web icon
Forge asset by Pedro Ramalho
Application Type
Traditional Web

Hello!


I am getting stuck trying set the PDF I want to use for PDF_FileIn

I uploaded the PDF as a resource but when I try to set FormFields_Get I get an error ('Binary Data' data type required instead of 'Text'. )


I am rather new to Outsystems so this is likely a simple fix. Thank you for your support!

2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Nindo,

Just articulating the same Nani already mentioned in his replies in a slightly different way..

As per the shared screen capture, you are calling the Server action (dot fully filled in orange) from the client scope i.e., within the client/screen action flow. Hence, you won't be able to access the Resources.{Resource}.Content property. 

As previously mentioned, note that the Resources.{Resource}.Content property can only be directly accessed within the Server scope i.e., within the Server action flow.

As a solution you can follow any of the below mentioned approach based on your requirement:

Approach 1: 

  • Define a Screen > DataSource action with an output parameter of Binary data type. 
  • In the DataSource action flow (server scope) you can access the Resource.Content property value and assign it as the value to the output parameter.
  • Map/pass the DataSource output binary value to the FormFields_Get server action call  as the PDF_FileIn input parameter value.

Approach 2: 

  • Wrap/call the FormFields_Get server action within a custom server action flow.
  • By this you can directly access and pass the Resource.Content property value as the PDF_FileIn input parameter value to FormFields_Get server action call.


Kind regards,

Benjith Sam

UserImage.jpg
Nindo

Hello Sir, thank you for following up! This is my first time working with Outsystems and getting quality community support is amazing.

I just posted a reply to nani with my progress. I believe that what I am doing now matches with your suggestion. I was able to access "xxx.Content" (hurray!)

I am not successfully getting the PDF Fields to populate on my desired screen. I assume I am missing logic and looking into that now.

The "Test" button runs but doesn't populate fields. (More screenshots to my reply to nani above)

Once again, thank you for your time!

UserImage.jpg
Nani
Solution

Hi 

Nindo

I know your new no problem outsystems always helps you.

Create a output parameter in server action and assign inside logic 

I think you are not even completed a basic training.

Reactive web app

First complete your basic reactive training course from the outsystems. So you will have a better idea how elements works.

If your issue is resolved mark a solution, so others will stop spending time on it.

I hope you understand what I am talking.

Thank you.

UserImage.jpg
Nani

Hi 

james cho 

The error your facing is data type problem, make sure you are assigning properly it should be "Resources."Filename in Osystems".Content".

if it doesn't resolve your issue you better share more details about your issues.

UserImage.jpg
Nindo

This is what I have for resources


Perhaps my logic is wrong?


this is what I want to start with
I agree the issue is the data type but I am stuck trying to figure out what to do here
It's not looking for a URL but that's the only option I see under resources.
Any recommendations are much appreciated, thank you!

UserImage.jpg
Nani

Your using client action maybe that the problem use server action.

call formfields_get action in server action and send pdf file.

UserImage.jpg
Nindo


The dot is fully filled in orange, doesn't that mean it's a server action? I am using the actions that come with PDFSharp I did not change anything about it from Outsystems Forge. I am also trying to follow the instructions here


UserImage.jpg
Nani

I think you haven't read my reply properly if you use resources file in client action mostly you get url but in server action you will get resources content.

If your issue doesn't resolved send your oml i will make sure the problem is resolved.

UserImage.jpg
Nindo

I see, I understand a bit better now.

I created a Server Action "Action1" and then was able to the PDF_FileIn for FormFields_Get to the pdf content under resources.

Client OnClick Action

Server Action1


I'm trying to have the fields that I get from the form show up on this screen
The button runs (show message acknowledging complete) but doesn't populate the list.


I am assuming that I am missing some logic, I will continue troubleshooting. Thank you for unblocking me so far I really appreciate the help as I am a noob :)

2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Nindo,

Just articulating the same Nani already mentioned in his replies in a slightly different way..

As per the shared screen capture, you are calling the Server action (dot fully filled in orange) from the client scope i.e., within the client/screen action flow. Hence, you won't be able to access the Resources.{Resource}.Content property. 

As previously mentioned, note that the Resources.{Resource}.Content property can only be directly accessed within the Server scope i.e., within the Server action flow.

As a solution you can follow any of the below mentioned approach based on your requirement:

Approach 1: 

  • Define a Screen > DataSource action with an output parameter of Binary data type. 
  • In the DataSource action flow (server scope) you can access the Resource.Content property value and assign it as the value to the output parameter.
  • Map/pass the DataSource output binary value to the FormFields_Get server action call  as the PDF_FileIn input parameter value.

Approach 2: 

  • Wrap/call the FormFields_Get server action within a custom server action flow.
  • By this you can directly access and pass the Resource.Content property value as the PDF_FileIn input parameter value to FormFields_Get server action call.


Kind regards,

Benjith Sam

UserImage.jpg
Nindo

Hello Sir, thank you for following up! This is my first time working with Outsystems and getting quality community support is amazing.

I just posted a reply to nani with my progress. I believe that what I am doing now matches with your suggestion. I was able to access "xxx.Content" (hurray!)

I am not successfully getting the PDF Fields to populate on my desired screen. I assume I am missing logic and looking into that now.

The "Test" button runs but doesn't populate fields. (More screenshots to my reply to nani above)

Once again, thank you for your time!

UserImage.jpg
Nani
Solution

Hi 

Nindo

I know your new no problem outsystems always helps you.

Create a output parameter in server action and assign inside logic 

I think you are not even completed a basic training.

Reactive web app

First complete your basic reactive training course from the outsystems. So you will have a better idea how elements works.

If your issue is resolved mark a solution, so others will stop spending time on it.

I hope you understand what I am talking.

Thank you.

UserImage.jpg
Nindo

Got it! Thank you both for your help <3

2021-03-18 21-03-15
Benjith Sam
 
MVP

You're welcome, Nindo. Glad you got it solved :)

Happy to help :)


Kind regards,

Benjith Sam

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.