I’ve been reading through the forum to see if this is possible or not, or have already been suggested, but I didn’t find anything, so this is my question/suggestion:
My app produces proposals to my customers. But I have found that I need to use different templates depending on the type of customer I am approaching. Some require more formal proposals, other require simpler one page proposals. To accomplish this I have to duplicate the entire workflow (bot) so that I can specify in the Attachment Template (see below) the appropriate version of the Google Doc I want the pdf to be created with.
But it occurred to me that if the Attachment Template field used a data tag like <<[doc_id]>> I could simply add the different DocId strings (i.e. DocId=xxxyyyyzzz) to a table and I could simply select in a dropdown in my app which template I wanted to use for the proposal.
I think this isn’t far fetched considering that the DocId string is parsed by the server in the context of the data provided when the bot is running anyway.
I tried doing just that but it didn’t work and the bot simply doesn’t succeed, without any indication in the bot monitoring screen about what the error was.
If someone knows if this is possible, please let me know how is it done. If it isn’t, I think this could be a great improvement to Appsheet.
I believe you may not have a variable in the Attachment Template doc ID .
However, I believe you could add branch on condition steps and check the status of [Template_Type] enum column in the "branch on Condition’ steps something like below. This is not as elegant as simply selecting a [Doc_ID] that you have in mind but you could achieve the needful in a single bot with several steps.
So, for each template you could branch based on the template enum value selected. A sample of bot steps screenshot below.
In the screenshot, the steps highlighted in red are branching steps that select the template based on the enum button’s ([Template_Type] ) selected value. The steps in highlighted in green contain steps having respective templates ( of course each with a different file ID).
Thank you @Suvrutt_Gurjar , I appreciate your suggestion and in fact that is precisely what I have done. It’s an improvement, but it is still limited since each email task needs to be manually configured, they can’t be reused.
The other limitation with this approach is that if you later decide to add another template, you’ll need to recreate the whole bot as you can’t insert new steps in between conditions:
To me it would be so simple if the Attachment Template parameter could be specified with a data tag, I don’t see why it isn’t possible, maybe an overlook?
You ate correct here. A variable doc ID will also help in setting up other elements such as launch image/ sync image etc. However since it is not yet available, we may need to work with workarounds. if you browse the “Feature Ideas” section, you will see many feature requests that have been around for multiple years. So AppSheet app creators many times come up with innovative workarounds that you can see in another section, "Tips and Tricks’ or even in this “Q&A” section.
Of course, the very term " workaround" comes with certain limitations as compared to a proper feature. It is entirely up to an app creator to go for it or not.
I believe this is not correct. You can simply extend the Y/N tree with additional options. Please refer the screenshot I have shared. I have simply cascaded the additional option. I have shown example of 3 options. I believe one can add any number of options below in similar fashion.
You are right! I missed that, the + sign appears when you hover the mouse over the branch!. I’ll use this “workaround” in the mean time. Thank you again @Suvrutt_Gurjar .