question

Aviram avatar image
Aviram asked

Can I use command to update datasource for rendered document?

Hi all,
I want to use a command to make the UI change with a new data.
My scenario is this:
I have 2 button and 1 text item.
When a user click each button an event get fire I get in in the lambda and I just want to send new data that will be displayed in the text item.

The text item take his text from a specific datasource (the first response from the lambda for the launch intent get the full document and datasource).
I want to send back in the 2nd and 3rd request (which are event from the user clicks) only the data source with the new data that will make the UI to re render with the new data.

I have only managed to do so by sending the whole "RenderDocument" again.
In the documentation I see this part but can't find any info how to do it exactly...:

Commands and screen actions

Commands support the following types of actions on the scene:

  • Change a component within an existing scene
    • Update an input control to reflect a new state
    • Change the visibility on an existing component

How can I do that?

How can I use such a command? \ How can I create a "user-defined command"?

alexa skills kitalexaapldocumentation
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Arun@Amazon avatar image
Arun@Amazon answered

Thanks for your feedback Aviram! Unfortunately, we do not support using commands to dynamically update data sources at this point. However, this is a feature on our backlog. I am working with the documentation team to have that section updated to make sure we don't confused other developers. Apologies for the confusion.

Thanks
Arun

1 comment
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Any updates on this? Can't seem to find anything.

1 Like 1 ·