Hi friends,
Is there any possibility to substitute long links in embedded appviews by short names as in this photo:
I want to substitute the long links with clickable names to open pdf file.
Best regards,
I have a column from which I display the link named File with display name :PDF Checklist with the following Image/File folder path:CONCATENATE("Files/", [ID], " - ", [Matricule Camion], ".pdf").How to make use of Hyperlink in this case?
How the file is saved or created -is it saved by the user by uploading through form or is it created by bot?
Also the CONCATENATE() based expression you have shared and the one in screenshot you have shared appear to be different. Could elaborate why?
The pdf file is created in a bot using an action "Create PDF Checklist" with
set the values of some columns in this row:
File=:CONCATENATE("Files/", [ID], " - ", [Matricule Camion], ".pdf")
And here is my column setup:
Here is also the setting of my bot:
@eldderri wrote:
set the values of some columns in this row:
File=:CONCATENATE("Files/", [ID], " - ", [Matricule Camion], ".pdf")
if you are using the action to set the entire file path as above, then please test by removing the expression in the "Image/ File Folder Path" setting.
I have removed the "Image/ File Folder Path" setting and the bot is normally creating the pdf file , but how to use hyperlink to display the file without the long link above?
If it is file type column it should display only file name.
Yes the column is of type File as shown above in the screenshot ,but when it comes to the embedded appview is displays as follows:
I am able to display the file generated by the bot.
The bot pane with relevant settings of attachment name and folder path
Attachment Name expression
<<CONCATENATE([Order ID], "-", TEXT([order Date],"YYMMDD"))>>
Attachment Folder path expression
CONCATENATE("Orders/",[Customer Name])
The file column in the table (VC) called [Order_File] expression
CONCATENATE(CONCATENATE("Orders/",[Customer Name]),"/",[Order ID], "-", TEXT([order Date],"YYMMDD"),".PDF")
This is basically concatenation of attachment folder path and attachment name expressions in the bot mentioned above.
The file column looks like below in detail view with file name
if the user taps on the file name it opens.
Hope this helps.
I have already the files displayed in the form detail used as embedded appview as you can see:
But the problem is when sent via email ,the file is displayed as long link
If you want to send a link, unless you use an address shortener (tinyurl.com, for example), the full address will appear in the email.
Another option is to send the file as an attachment instead of the file address. To do this, you will need to use a bot and Google Apps Script.
I am able to properly see the file name. Here is the emai body received from bot. I can see the link with the file name.
And here is the template in which the File column , [Order_File] that I referred earlier is used.
But in my case I am using an embedded appview and not a simple template, because I want the user to interact with form by clicking either Bloquer or Annuller as you can see here:
I am aiming at making this form smaller to include other info
Sorry it is getting a bit more confusing. The Bloquer or Annuller appear to be enum buttons. What is their relationship with the links?
If you are only referring to links, yes, they do not even open in embedded app view. Are you able to open the files with those long links?
Yes ,I can open them .The user before blocking or cancelling the operation ,he has to check the checklist and the sd form attached in the appview
You mean, you can open them in the embedded app view?
Absolutely yes
Okay, got it. I am also getting a long URL in the embedded view. Will perform more testing and revert if that can be shortened.
Ok ,I will try in my turn to get a solution
My testing shows that in spite of using the HYPELINK() function, in the embedded app view, the URL Link expands.
So there does not seem to be a native way for a short URL Link. The screenshot below shows the two columns [Image_URL] and [Image_Link]
Both take to the product image. But [Image_Link] is hyperlink so, it is short.
In the normal detail view basically there are navigation actions associated with those two columns as shown by the link icons ( highlighted in green below) to the extreme right.
However in the embedded view, both columns show as expanded URLs as shown below in the embedded view screenshot. I believe since navigation actions do not work in the embedded app view, the embedded app view shows entire URL.
Please see the excerpt from the help article
here is the article:
Send embedded app view email from an automation - AppSheet Help
Embedded view screenshot as below:
Well, at this moment @JSO 's suggestion of using tiny URLs, you may want to explore.
Could you please give me the exact link of @JSO for this subject.Furthermore, I think this subject requires much more attention is it would have a remarkable effect on the look of the email embedded appview in terms of looking and space in the view itself.
Please see the third post in this post itself where @JSO has responded.
For overall correction from AppShhet team, yes I agree with you. Please raise this as a bug or feature idea.
If Appsheet team feels it is a bug, there is a greater chance of it being solved faster.
I use the function acortarUrlTiny(urlLarga), written in GAS.
I call it from AppSheet, I pass it the long URL and what it returns
I save it in another column in AppSheet and that is the one I use.
I use the same function preceded by _ to check it from the GAS itself.
In the example it returns me https://tinyurl.com/2c3g8osf
/** ****************************************************************************************************
* Crear una URL corta partiendo de otra que seguramente es mas larga
* @param {string} urlLarga - una url (comprobar que existe)
*
* @return {string} - una Url corta con prefijo "https://tinyurl.com/" que redirige a la larga
*/
function acortarUrlTiny(urlLarga) {
let url = 'http://tinyurl.com/api-create.php?url=' + urlLarga;
console.log("urlAccion:" + urlLarga)
let response = UrlFetchApp.fetch(url, { muteHttpExceptions: true });
console.log("response:", response);
let urlCorta = response.getContentText()
console.log("urlCorta: " + urlCorta)
return urlCorta
}
/** Probar la funcion **/
function _acortaURLTiny() {
let urlLarga = "https://www.google.com/maps/dir/Utebo,+50180,+Zaragoza/Getafe,+Madrid/@41.0992388,-3.4572332,8z/data=!3m1!4b1!4m14!4m13!1m5!1m1!1s0xd596e8d1d06140f:0x3feebd37a88eaf9c!2m2!1d-0.9986738!2d41.7087277!1m5!1m1!1s0xd42209a1ebb8201:0x20c3fa90b7e442fc!2m2!1d-3.7323934!2d40.3082504!3e0?entry=ttu"
let urlCorta = acortarUrlTiny(urlLarga);
console.log("urlLarga: " + urlLarga)
console.log("urlCorta: " + urlCorta)
return urlCorta;
}
User | Count |
---|---|
15 | |
15 | |
8 | |
7 | |
4 |