question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Choice.Value can't be nulll

See original GitHub issue

Describe the bug

There is no clear division of responsibility between the two Value fields:

  • If you only set the ActionCard.Value, you will receive a runtime error: Object reference not set to an instance of an object.
  • If you set only the Choice.Value, an ActionCard will be displayed but it will not perform a post.
  • If you set the both fields, you will not know which ones you will receive in the post.

To Reproduce

Use Choice as follow:

new Choice()
{
    Action = new CardAction(
        type:ActionTypes.PostBack, 
        title:"Select this item",
        value:1)
}

Expected behavior

Use the value from the CardAction to be the Choice.Value if Choice.Value is null.

[bug]

I’m willing to help, just tell me where.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mdrichardsoncommented, Mar 19, 2019

PromptOptions is a set of options that you pass to a Prompt.

For a ChoicePrompt, it’s the object that contains the Choices.

image

0reactions
baruchirocommented, Mar 19, 2019

I was too deep and missed the base.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error with drop down field in SAIL form
dropdownField [line 64]: A dropdown component [label=“Label”] has an invalid value for “choiceValues”. Choice values cannot be null."
Read more >
Dropdown null value issue
Hi ,. I have an issue with dropdown. I want to display current year by default in my year dropdown. For that i...
Read more >
Value cannot be null. (Parameter 'items')" using a ...
I am getting the error "ArgumentNullException: Value cannot be null. (Parameter 'items')" when I try to create new database records. I am able ......
Read more >
Why do I get an error "value cannot be null (Parameter ...
I am using the example code from https://learn.microsoft.com/en-us/answers/questions/299791/saving-to-appsettingsjson.html.
Read more >
Value cannot be null - Power Platform Community - Microsoft
Solved: I am trying to add Site Columns to a Document Library using Flow. I used "Send an HTTP request to SharePoint" to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found