[Adaptive] `getProperty` prebuilt function or dynamic index does not work
See original GitHub issueOur Todo bot sample uses this approach and this does not work in master.
The goal is that we need this -
user.lists = {
"todo": [
"one",
"two"
],
"shopping": [],
"generic": []
}
The following C# code does not work -
var rootDialog = new AdaptiveDialog(nameof(AdaptiveDialog))
{
Generator = new TemplateEngineLanguageGenerator(),
Triggers = new List<OnCondition>()
{
new OnConversationUpdateActivity()
{
Actions = WelcomeUserAction()
},
new OnIntent() {
Intent = "GetUserProfile",
Actions = new List<Dialog>() {
new InitProperty() {
Property = "user.lists",
Type = "object"
},
new SetProperty() {
Property = "$listName",
Value = "'todo'"
},
new InitProperty() {
// Alternatively getProperty(user.lists, $listName) does not work either
Property = "user.lists[$listName]",
Type = "array"
},
new EditArray() {
// Alternatively getProperty(user.lists, $listName) does not work either
ItemsProperty = "user.lists[$listName]",
Value = "'one'",
ChangeType = EditArray.ArrayChangeType.Push
},
new SendActivity() {
Activity = new ActivityTemplate("I have '{join(user.lists[$listName], ', ')}'")
}
}
}
}
};
Expected:
I have 'one'
Actual:
Exception caught : Error occurs when evaluating expression $join(user.lists[$listName], ', '): user.lists[$listName] evaluates to which is not a list.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
4.6 Milestone
[Adaptive] getProperty prebuilt function or dynamic index does not work 4.6 ... [Adaptive] Validation on inputs do not work correctly when the input's ......
Read more >Retrieving a property of a JSON object by index?
1 You may want to use the hasOwnProperty() method to ensure that the properties belong to your object and are not inherited from...
Read more >Add System Properties
This page provides a canonical method for adding or defining system properties in Android, with guidelines for refactoring existing system properties.
Read more >Developing Dynamically Reconfigurable Real-Time ...
In order to address the incompatibility of using the OSGi Framework to develop and deploy dynamically reconfigurable real-time applications, the Real-. Time ...
Read more >Configuration | Apache Flink
Configuration # All configuration is done in conf/flink-conf.yaml, which is expected to be a flat collection of YAML key value pairs with format...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I verified in Tom’s branch, it is working now.
#2818 PR is out