PRINT PDF > External Link

I know that something similar to this has been posted before. But I have been almost one month already + Appsheet Team has not answered yet, so I would love to ask for your kind help as I am already quite frustrated, I cannot get it :woozy_face:.

We have 2 prototype apps:

1x for our clients, called “AutoQuote
1x for our suppliers, called “Supplier

After the Client books at “AutoQuote”, the Supplier will see it at “Supplier” and confirm it >> automatically is generated an invoice (by a bot) for the Client (note: the Supplier will also upload their invoice for us).

Whenever the invoice is generated, it is registered in a Table ALL QUOTs , in a column [Invoice]. But the problem is that it generates a link referred to the app from where it was generated (i.e. /Invoices/…), this means at the app “Supplier”.

The good thing would be that the link generated would NOT be i.e./Invoices/ but https://www… so that the other app “AutoQuote” can still read it and show the invoice to the Client, who is accessing from the app “AutoQuote”.

Please could you help?!! Thanks so much!

This just works when opening a file in google drive.

Dear Steve and Luis,

Thank you very much for your kind help. I am making a complex app and I’m very happy with Appsheet but this is already getting me frustrated after 1 month trying so many things, and no way. Please could you give me another hand…?..

With the bot at the app “SUPPLIER” the pdf is generated & saved at file /Invoices for Agts/.
The problem is I am not writing well the path, somehow.
I have 2 columns:
[Inv. AGT] with the App Formula:
image

and
[Inv. AGT WEB] with the App Formula: 2021-10-12_11h36_28
, following the instructions that you sent me Steve (thanks), but something is happening that the name of the App & the table do not appear. Anyway I have tried, adding them manually to the link and I cannot get it either…

I also think that the problem is mainly in the column [Inv. AGT] because when I click on the symbol of the app nothing appears:
2021-10-12_11h43_04

Thanks so much again!
Btw, Appsheet team has not replied yet to me :frowning:

image

Your use of CONTEXT() is wrong, though I know you meant well. The first use above should instead be exactly:

CONTEXT("AppName")

The second should be exactly:

CONTEXT("Table")

No need for you to substitute the appropriate values yourself.

@Jewel the reply Steve has make will help you visualize your pdf but only if your data is located in Google drive.
I currently use Sharepiont (office 365) but the url isnt “standardize” like google’s

As far as I know, the expression Steve explained will work to any backend service, it does not matter where the images and files are saved.

1 Like

Correct.

1 Like

Also my understanding AppSheet is no way to save files and images to Sharepoint, but it would save to OneDrive.

1 Like

Thanks all my ANGELS of Appsheet: Steve, Luis and Tsuji Koichi.

I tried what you said, Steve, but still the system cannot find the file:
image

So I think the error is on how I have programmed the app to find the file…
If at the bot I input…
2021-10-14_10h08_54
CONCATENATE([Booking ID]," ",[Booking Detail ID])

and on the table…


Where:
[Inv. AGT]: “Invoices for Agts/”&[Booking ID]&" “&[Booking Detail ID]&”.pdf"
[Inv. AGT Web]: CONCATENATE(
https://www.appsheet.com/template/gettablefileurl”,
“?appName=”, ENCODEURL(CONTEXT(“AppName”)),
“&tableName=”, ENCODEURL(CONTEXT(“Table”)),
“&fileName=”, ENCODEURL([Inv. AGT])
)

Then… where is the error?.. I have tried 1000 formulas during one month but it resists itself :slight_smile: THANKS so much dear ANGELS!

1 Like

Could you share the relative path for your current default app folder?
you can find info pane, properties tab.

1 Like

Sure:
2021-10-14_11h01_04
Thanks so much Tsuji!

1 Like

What I mean is this.

1 Like

So sorry. Sure here it is:
2021-10-14_11h28_53

Sorry I had to delete the name of our company but let’s say “Supplier XXX” :slight_smile: Thanks so much again :pray:

1 Like

Try this one out.

On your source table, create virtual column and set to file type.

For App formula, push the relative like, which looks something like this.

`

“/appsheet/data/SupplierXXXX/Invoices for Agts/”&Concatenate([Booking ID], “…)&”.pdf"

`

I can not see your full expression for File name prefix which come to the end of the relative pash, please amend URL accordingly to match your environment.

This will generate the file action. You can pass this column value to Automation template where you will see hyperlink to reach out the file on the output file (PDF etc)

1 Like

Thanks so much for the idea!
I have tried it but unfortunately it cannot find it… :weary:
2021-10-14_12h10_55
2021-10-14_12h13_06

But the bot creates the file and save it well:

If we recheck:
image, where:
CONCATENATE([Booking ID]," ",[Booking Detail ID])

image
… then… on the table I created a virtual column:

, where:

**the hidden part is our company, so: /Supplier XXX/…

No idea where is the error… By the way, the file where these PDFs are being saved, I have made it viewable by anyone with the link.
Thanks so much again!

1 Like

As far as I see your expression is valid.
Possibly file cache doing something wrong.

Refer to my tips and tricks I introduced here.

Change your system generated fie action using this technique.

1 Like

it do save it in OneDrive but i can see it in sharepoint, but the expression Steve has show, had only work for me when I use my google account with a sheet in Drive.