Hi,
I've searched the forum and I'm still stuck.
I have an XY Map view called layouts which works as desired and is shown below. This view generates when a button-based action fires in the app. Here's the expression in that action: LINKTOFILTEREDVIEW("Layouts", [id] = [_THISROW].[id])
Here's my issue.
When I run a bot to generate an email, with an HTML template, the bot works, sends the template, the data in the template table is correct, except for one thing... The SNAPSHOT() function shows a blank app screen as shown below.
This is the line of code I'm using in the HTML file to call the XY MAP view. I don't get any errors. It's just a blank, as if there's no data...?
I have set the bot to bypass security filters.
<<SNAPSHOT(LINKTOFILTEREDVIEW("Layouts", [id] = [_THISROW].[id]))>>
I've been banging my head on this thing for some time now and, I'd be very grateful for some help here.
@Fabian_Weller, your name keeps popping up in the forum for map stuff so I've cheekily tagged you. Hope that's OK.
Many thanks in advance... ๐
Solved! Go to Solution.
You are welcome. Sure, I think if would be some peculiar setting that someone could take a close look at in the app itself. So support ticket sounds a good option.
Edit: My one request to you will be to base the "Layouts" view also on the slice "QA Approved" just for testing purpose and test if the SNAPSHOT(0 function works. In my testing , one difference is I do not have two different slices. In fact both the views are based on table.
Generally , your expression seems to be good.
I tested with the following HTML code in the email body and it works.
<html>
<head>
</head>
<body>
<<SNAPSHOT(LINKTOFILTEREDVIEW("Orders_Detail", [Order id] = [_THISROW].[Order id]))>>
</body>
</html>
Of course view name and column name were different in my testing. You could suitably replace as below
<html>
<head>
</head>
<body>
<<SNAPSHOT(LINKTOFILTEREDVIEW("Layouts", [id] = [_THISROW].[id]))>>
</body>
</html>
The email sent properly captured the snapshot image in my testing as shown below.
Hi @Suvrutt_Gurjar ... Thanks for taking the time to test... Much appreciated... ๐
I will strip mine down to basics, test again, and report back ASAP.
Cheers... ๐
Hi @Suvrutt_Gurjar ... I'm still bumping my head against this thing. I can get the view to show in my HTML template, but it just doesn't seem to hold any row data...? Here's a detailed look at my setup... ๐ค
I have a QA APPROVED VIEW
Which looks at the QA APPROVED DATA SLICE of the surveys table.
Here's what it looks like in the app:
When I click on the inline bulb icon, it fires an action to update to the [trigger] column in the surveys table.
Here's the associated trigger action.
I have a test_approved_BOT that is listening for the following condition:
AND(
[QA_status] = "QA Approved",
[_THISROW_BEFORE].[trigger] <> [_THISROW_AFTER].[trigger]
)
When the condition is met, the bot sends an email:
The bot uses an EMAIL BODY TEMPLATE that points to an HTML file:
.../AppSheet/data/Pre-Installation-CRMS/Templates/test.html
Here's the HTML file:
I don't know what it could be since it worked for another user.
Check to see if the problem is the included characters. The user for whom it worked changed the << >> and others for characters &:
I think the problem is the limitation that a bot has in handling calls to view presentations.
Perhaps a solution would be to generate a preview image of what you want to present in a column and put said column in the HTML instead of calling LINKTOFILTEREDVIEW()
Hi @JSO... Thanks for that suggestion... Sounds interesting and less complicated... ๐
Please could you very briefly outline the basic high-level steps to do that...?
Hopefully that'll be enough to point me in the right direction.
Many thanks... ๐
I think it could work if you create a virtual column of type image and whose content is:
SNAPSHOT(LINKTOFILTEREDVIEW("Designs", [id] = [_THISROW].[id]))
Then that column is included in the body of the HTML.
I haven't checked it, so I can't give certainty.
If there are many rows, it will be more profitable to work with a real column in the Sheet.
Thanks @JSO ... That makes sense... I'll give that a go right away... Cheers... ๐
Thanks for your support with this one @JSO & @Suvrutt_Gurjar.
I tested SNAPSHOT() thoroughly, but ultimately gave up on it.
@JSO, you mentioned using a separate spreadsheet/virtual column to do the heavy lifting of the SNAPSHOT(LINKTOFILTEREDVIEW... I tried many versions of that and gave up there too.
However, you led me to thinking about a helper-column. I now have a working image column that fetches a saved floor plan image from a folder, and shows it in my HTML Email Body Template.
For the moment I do not have a location pin, but I will keep working on this.
Thank you both... ๐
Hi @jakenaude ,
Thank you for all details and sorry for a bit late revert as I wanted to test with exactly similar condition as yours , meaning with an XY column based image. My yesterday's testing was with all similar conditions as yours but LINKTOFILTEREDVIEW() applied on a general detail view and not a map view.
My current testing with both Google map view and an XY image based column still give correct results in the email body. Please see the SNAPSHOT() produced on a XY image testing.
The image of the email body received through bot is shown below. The test background image of the XY column of a soccer field is with dark green background so it is a bit difficult to see the map pin. So I have highlighted it with a red circle.
All in all, my testing with XY column is successful.
At this point, would you please mention how the table/slice used for the "Layout" view is related to the "Surveys" table?
Hi @Suvrutt_Gurjar... Your extensive testing and perseverance is much appreciated... ๐
I will go ahead and also test this approach: LINKTOFILTEREDVIEW() applied on a general detail view and not a map view
The Layouts view uses Layouts slice on the surveys table, and has an updates and adds relationship.
Thank you. I think slice expression for the Layouts view also looks good. Since slice has an expression of NOT([QA_Status]) ="Permannt Record"), it should select all the records such as [QA_Status]="QA Approved" which is a status for the other slice and the bot firing condition.
So all looks good. And since the action works well with "Layouts" view, it means the map view is also set up properly.
So all looks good for now and not more to suggest at this moment.๐ At least it is working on a similar set up for me.๐
Thanks @Suvrutt_Gurjar... I appreciate your efforts...
Please could you give me some guidance on one thing...?
I'd like to reconstruct the process as you did but I'm having difficulty understanding the steps to apply LINKTOFILTEREDVIEW() on a general detail view and not a map view
I've created a detail view called Layouts General Detail but I'm failing to show the XY image and the pin in there.
Please could you highlight the basic, high-level steps for me...?
A few bullet points should do the trick...?
Many thanks... ๐
@jakenaude wrote:
l but I'm failing to show the XY image and the pin in there.
Hi @jakenaude ,
I am afraid, as per my understanding, you will be unable to show the XY image and pin in the detail view. I had mentioned detail view just to test the SNAPSHOT() function works in the HTML template when I started responding to your post, As a side note AppSheet help documents mentioned that displaying XY column image in a template is not possible.
Display Address, LatLong, and XY values in templates - AppSheet Help
So your workaround of using SNAPSHOT() seems to be good approach to overcome above limitation.
To clarify , I think we tested the issue in two steps
1) To ensure SNAPSHOT() works in HTML template: this was established by testing a detail view with SNAPSHOT() in HTML template
2) SNAPSHOT() with map view works in an HTML template. My testing showed that it works with map view as well. However we are unable to get it working in your setup even though our settings and approach seems to be similar.
Hope I could explain.
Hi @Suvrutt_Gurjar... OK buddy... I thank you for your time and efforts... We got so, so close... If it works for you, it should work for me right...? I'll raise a support ticket and ask them to see what I'm doing differently to you. Thanks again. Much appreciated... ๐ ๐ ๐
You are welcome. Sure, I think if would be some peculiar setting that someone could take a close look at in the app itself. So support ticket sounds a good option.
Edit: My one request to you will be to base the "Layouts" view also on the slice "QA Approved" just for testing purpose and test if the SNAPSHOT(0 function works. In my testing , one difference is I do not have two different slices. In fact both the views are based on table.
"...one request to you will be to base the "Layouts" view also on the slice "QA Approved..."
@Suvrutt_Gurjar, you are a rock star dude...!!! Thanks for not giving up!
Pointing the Layouts view to a new slice did the trick...!!! Here's the result... ๐ ๐ ๐
Wow ! That is great. Glad to know you have it working. Thanks to you as well for always providing elaborate details and testing out the options. A good collaboration does make the difference for such solutions.
All the best.
User | Count |
---|---|
19 | |
10 | |
7 | |
5 | |
5 |