Hey everyone,
I am currently working on an implementation of a date-picker in PVA, I've managed to get to the point that I can get the adaptive card to show up in PVA just fine but I have run into multiple issues which I think are just due to my lack of understanding when it comes to adaptive cards. (https://adaptivecards.io/explorer/Input.Date.html)
What I want to do is let customers put in holiday requests through PVA by:
- Showing a date-picker to let a user pick a holiday start date
- Passing this value back to PVA and confirming the date with the user
- Repeating the above two steps for an end-date.
Then pass the start-, and end-date (ideally formated as DD-MM-YY) to a flow that checks the difference between these dates (using ticks) against a user's available holidays, and then tells a user whether or not they can actually make the request. I've gotten all these flows to work just fine, and can show the date-picker in PVA.
I have two major issues:
1. I don't know how to pass the value back to PVA, I've tried to use global variables but this has not worked, see:
Does anyone know what I am doing wrong here? I thought it may not loop correctly, or may not actually set the value right using turn.activity, I was mostly following the microsoft documentation (https://docs.microsoft.com/en-us/power-virtual-agents/advanced-bot-framework-composer-example1) and the other examples. Can someone tell me what I am doing wrong here, and maybe show an example of how to do it right?
The second issue I have is that I cannot seem to call the same adaptive card twice, even if I have made a new dialog in Bot Framework Composer that is a copy of the one showing the adaptive card:
Please ignore the hard-coded dates. 🙂 Here DateCard and DateCardEnd are separate dialogs in Bot Framework Composer (and therefore topics in PVA) but the second one is skipped as you can see.
I hope someone can help me understand this better, and everyone else that might want to do this (though I hope that PVABuild22 might make all of this easier).
Sincerely,
N