Data Entry with Adaptive Card

Options

I have an adaptive card that is using a dropdown of values from Address Type code table. The dropdown all say “undefined”. I'm pretty sure the flow is reading the code table because all the values show in the Parse JSON, Outputs and the JSON. What am I missing?

6034fa4e79fcec600595074124786242-huge-im
This is the field in the Adaptive Card

Comments

  • @Wendy Bondeson Can you share what is showing in the Output of the Response action? (either a screen shot of all of the actual text if that is easier)

  • @Ashley Moose - there are 13 values.

    1d961effd7ad989060a1e3990f032b81-huge-im

  • @Wendy Bondeson What happens if you test in the adaptive card designer? https://adaptivecards.io/designer/

    Create a new blank card > Update the Host App to Outlook Actionable Messages > paste the entire JSON response into the Card Payload Editor > then test in Preview mode.

    Does undefined display when previewing there?

  • c09e88cab7114932e61654fb745c002b-huge-im
    Choice sets in adaptive card designer
    4556951b7666bb4cfd8ae769da6c5cb2-huge-im

    @Ashley Moose no, blank fields. Should I have input the choice names in the designer? That's seem silly if the fields are in JSON.

  • @Wendy Bondeson Doing that would change the overall layout of your JSON so that may not be a comparable test. Would you mind sharing your entire JSON so I can see if anything sticks out in terms of formatting?

  • @Ashley Moose this is my JSON

    {
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.4",
    "body": [
    {
    "type": "Input.Text",
    "placeholder": "Enter Title",
    "id": "Title",
    "label": "Title",
    "isRequired": true,
    "errorMessage": "Required field"
    },
    {
    "type": "Input.Text",
    "placeholder": "Enter First Name",
    "id": "First",
    "label": "First Name",
    "isRequired": true,
    "errorMessage": "Required field"
    },
    {
    "type": "Input.Text",
    "placeholder": "Enter Middle Name",
    "id": "Middle",
    "label": "Middle Name"
    },
    {
    "type": "Input.Text",
    "placeholder": "Enter Last Name",
    "id": "Last",
    "label": "Last Name",
    "isRequired": true,
    "errorMessage": "Required field"
    },
    {
    "type": "Input.Text",
    "placeholder": "Enter Suffix",
    "id": "Suffix",
    "label": "Suffix"
    },
    {
    "type": "Input.Text",
    "placeholder": "Enter Street Address",
    "id": "StreetAddress",
    "label": "Street Address",
    "isRequired": true,
    "errorMessage": "Required field"
    },
    {
    "type": "Input.Text",
    "placeholder": "Enter City",
    "id": "City",
    "label": "City",
    "isRequired": true,
    "errorMessage": "Required field"
    },
    {
    "type": "Input.Text",
    "placeholder": "Enter State",
    "id": "State",
    "label": "State",
    "isRequired": true,
    "errorMessage": "Required field"
    },
    {
    "type": "Input.Text",
    "placeholder": "Enter Zip",
    "id": "Zip",
    "label": "Zip Code",
    "isRequired": true,
    "errorMessage": "Required field"
    },
    {
    "type": "Input.ChoiceSet",
    "choices": @{body('Select__Address_Type')},
    "isRequired": true,
    "errorMessage": "Required field",
    "id": "AddressTypes",
    "label": "Address Type"
    },
    {
    "type": "Input.Text",
    "placeholder": "Enter Email",
    "id": "Email",
    "label": "Email"
    },
    {
    "type": "Input.ChoiceSet",
    "choices": [
    {
    "title": "Yes",
    "value": "Yes"
    },
    {
    "title": "No",
    "value": "No"
    }
    ],
    "placeholder": "Select",
    "id": "EmailPrimary",
    "label": "Is this email primary?"
    },
    {
    "type": "Input.ChoiceSet",
    "choices": [
    {
    "title": "Yes",
    "value": "Yes"
    },
    {
    "title": "No",
    "value": "No"
    }
    ],
    "placeholder": "Select",
    "id": "ESolicitations",
    "label": "Should this email receive e-solicitations?"
    },
    {
    "type": "Input.Text",
    "placeholder": "Enter Phone Number",
    "id": "Phone",
    "label": "Phone Number"
    },
    {
    "type": "Input.ChoiceSet",
    "choices": [
    {
    "title": "Home",
    "value": "Home"
    },
    {
    "title": "Cell",
    "value": "Cell"
    },
    {
    "title": "Business",
    "value": "Business"
    }
    ],
    "placeholder": "Select phone type",
    "id": "PhoneType",
    "label": "Phone Type"
    },
    {
    "type": "ActionSet",
    "id": "Submit",
    "actions": [
    {
    "type": "Action.Webrequest",
    "title": "Submit",
    "url": "https://prod-189.westus.logic.azure.com:443/workflows/"
    }
    ]
    }
    ]
    }

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 PowerUp Challenge #3 Gift Management Name Dropper

    @Wendy Bondeson
    Your “choices” array in the adaptive card json is not correctly using “title” and “value” is the problem.

    Try changing your “Address Types” to “title”

    "choices": [

    {

    "title": "Home",

    "Value": "home"

    },

    {

    "title": "Business",

    "Value": "business"

    }

    ],

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 PowerUp Challenge #3 Gift Management Name Dropper

    @Wendy Bondeson
    I also notice you are using the dynamic content for a select action for choices:

    @{body('Select__Address_Type')}

    You can remap the select action to use title and value as the property name

  • @Alex Wong I am using this action to get @{body('Select__Address_Type')}. Should I skip this step? I did try to change title to address types but didn't change the results.

    f50c32e26cfe2a50fe1927b3bf99210c-huge-im


  • @Alex Wong Good catch! I was just scanning back through the prior comment and noticed the title label wasn't set correctly. Totally missed that the first time!

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 PowerUp Challenge #3 Gift Management Name Dropper

    @Wendy Bondeson
    on a run, show the output of the select action and the json of the adaptive card again.

  • @Alex Wong here is the output on a run for

    address type:

    "type": "Input.ChoiceSet",

    "choices": [

    {

    "Title": "Home",

    "Value": "Home"

    },

    {

    "Title": "Business",

    "Value": "Business"

    },

    {

    "Title": "Physical",

    "Value": "Physical"

    },

    {

    "Title": "Military",

    "Value": "Military"

    },

    {

    "Title": "Foreign",

    "Value": "Foreign"

    },

    {

    "Title": "Other",

    "Value": "Other"

    },

    {

    "Title": "Financial Processor",

    "Value": "Financial Processor"

    },

    {

    "Title": "Previous address",

    "Value": "Previous address"

    },

    {

    "Title": "PO Box",

    "Value": "PO Box"

    },

    {

    "Title": "Seasonal",

    "Value": "Seasonal"

    },

    {

    "Title": "TBD",

    "Value": "TBD"

    },

    {

    "Title": "Temporary",

    "Value": "Temporary"

    },

    {

    "Title": "Invalid",

    "Value": "Invalid"

    }

    ],

    "isRequired": true,

    "errorMessage": "Required field",

    "id": "AddressTypes",

    "label": "Address Type"

    JSON:
    {

    "type": "AdaptiveCard",

    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",

    "version": "1.4",

    "body": [

    {

    "type": "Input.Text",

    "placeholder": "Enter Title",

    "id": "Title",

    "label": "Title",

    "isRequired": true,

    "errorMessage": "Required field"

    },

    {

    "type": "Input.Text",

    "placeholder": "Enter First Name",

    "id": "First",

    "label": "First Name",

    "isRequired": true,

    "errorMessage": "Required field"

    },

    {

    "type": "Input.Text",

    "placeholder": "Enter Middle Name",

    "id": "Middle",

    "label": "Middle Name"

    },

    {

    "type": "Input.Text",

    "placeholder": "Enter Last Name",

    "id": "Last",

    "label": "Last Name",

    "isRequired": true,

    "errorMessage": "Required field"

    },

    {

    "type": "Input.Text",

    "placeholder": "Enter Suffix",

    "id": "Suffix",

    "label": "Suffix"

    },

    {

    "type": "Input.Text",

    "placeholder": "Enter Street Address",

    "id": "StreetAddress",

    "label": "Street Address",

    "isRequired": true,

    "errorMessage": "Required field"

    },

    {

    "type": "Input.Text",

    "placeholder": "Enter City",

    "id": "City",

    "label": "City",

    "isRequired": true,

    "errorMessage": "Required field"

    },

    {

    "type": "Input.Text",

    "placeholder": "Enter State",

    "id": "State",

    "label": "State",

    "isRequired": true,

    "errorMessage": "Required field"

    },

    {

    "type": "Input.Text",

    "placeholder": "Enter Zip",

    "id": "Zip",

    "label": "Zip Code",

    "isRequired": true,

    "errorMessage": "Required field"

    },

    {

    "type": "Input.ChoiceSet",

    "choices": [

    {

    "Title": "Home",

    "Value": "Home"

    },

    {

    "Title": "Business",

    "Value": "Business"

    },

    {

    "Title": "Physical",

    "Value": "Physical"

    },

    {

    "Title": "Military",

    "Value": "Military"

    },

    {

    "Title": "Foreign",

    "Value": "Foreign"

    },

    {

    "Title": "Other",

    "Value": "Other"

    },

    {

    "Title": "Financial Processor",

    "Value": "Financial Processor"

    },

    {

    "Title": "Previous address",

    "Value": "Previous address"

    },

    {

    "Title": "PO Box",

    "Value": "PO Box"

    },

    {

    "Title": "Seasonal",

    "Value": "Seasonal"

    },

    {

    "Title": "TBD",

    "Value": "TBD"

    },

    {

    "Title": "Temporary",

    "Value": "Temporary"

    },

    {

    "Title": "Invalid",

    "Value": "Invalid"

    }

    ],

    "isRequired": true,

    "errorMessage": "Required field",

    "id": "AddressTypes",

    "label": "Address Type"

    },

    {

    "type": "Input.Text",

    "placeholder": "Enter Email",

    "id": "Email",

    "label": "Email"

    },

    {

    "type": "Input.ChoiceSet",

    "choices": [

    {

    "title": "Yes",

    "value": "Yes"

    },

    {

    "title": "No",

    "value": "No"

    }

    ],

    "placeholder": "Select",

    "id": "EmailPrimary",

    "label": "Is this email primary?"

    },

    {

    "type": "Input.ChoiceSet",

    "choices": [

    {

    "title": "Yes",

    "value": "Yes"

    },

    {

    "title": "No",

    "value": "No"

    }

    ],

    "placeholder": "Select",

    "id": "ESolicitations",

    "label": "Should this email receive e-solicitations?"

    },

    {

    "type": "Input.Text",

    "placeholder": "Enter Phone Number",

    "id": "Phone",

    "label": "Phone Number"

    },

    {

    "type": "Input.ChoiceSet",

    "choices": [

    {

    "title": "Home",

    "value": "Home"

    },

    {

    "title": "Cell",

    "value": "Cell"

    },

    {

    "title": "Business",

    "value": "Business"

    }

    ],

    "placeholder": "Select phone type",

    "id": "PhoneType",

    "label": "Phone Type"

    },

    {

    "type": "ActionSet",

    "id": "Submit",

    "actions": [

    {

    "type": "Action.Webrequest",

    "title": "Submit",

    "url": "https://prod-189.westus.logic.azure.com:443/workflows/(removed the rest of the link"

    }

    ]

    }

    ]

    }

  • Alex Wong
    Alex Wong Community All-Star
    Ninth Anniversary Kudos 5 PowerUp Challenge #3 Gift Management Name Dropper

    @Wendy Bondeson
    This is for your future work: when debugging, take the adaptive card JSON to put into the designer: https://adaptivecards.io/designer/

    from there try to figure out how the “problem” element compares to ones that works.

    when I change the Title to title and Value to value, the drop down works.

    So, in your Select Address Type action, change your Map to use title and value instead of Title and Value.

  • @Alex Wong thank you so much!!!!!

Categories