PRINT PDF > External Link

Jewel
New Member

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 .

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!

0 17 468
17 REPLIES 17

Steve
Platinum 4
Platinum 4

This just works when opening a file in google drive.

Jewel
New Member

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:
3X_6_9_6902d10f61acccdd7fd08433aba1163667e9014f.png

and
[Inv. AGT WEB] with the App Formula: 3X_4_8_48bc679518de0f2e602080bc80634773efc76453.jpeg
, 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:
3X_3_5_35dcc5af51fab54a2ef01c1c37070d187127a051.jpeg

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

3X_7_d_7d729c47aab7dca53fa2116fde7514d77e9ac888.png

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.

Correct.

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

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.

Jewel
New Member

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:
3X_9_0_9059eac1d9f096afcb8df84c3f2632c609bae0ec.png

So I think the error is on how I have programmed the app to find the file…
If at the bot I input…
3X_9_f_9fda0567002da2bf4a9816d164902ebc862d5e91.jpeg
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 THANKS so much dear ANGELS!

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

Jewel
New Member

Sure:
3X_3_1_31540d7f931aa41512cc7e6e8e760c4d38d6ac34.jpeg
Thanks so much Tsuji!

What I mean is this.

Jewel
New Member

So sorry. Sure here it is:
3X_4_1_413ae3aed6c8d8da628c9d3fddcd727ca0eaf872.jpeg

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

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)

Jewel
New Member

Thanks so much for the idea!
I have tried it but unfortunately it cannot find it…
3X_2_8_2894f6d4e1f43938dd318104dc4585a342246d47.jpeg
3X_a_c_acef81341c90ac11a3df12f0b0aa11242c2676f2.jpeg

But the bot creates the file and save it well:

If we recheck:
3X_b_f_bfe4cde057e55690857716e54c3d80299ada582f.png, where:
CONCATENATE([Booking ID]," ",[Booking Detail ID])

3X_3_b_3bfbdca00a7dc89a422a18aa22dfe1b59327edd1.png
… 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!

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.

Top Labels in this Space