web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Dynamic adaptive cards...
Copilot Studio
Unanswered

Dynamic adaptive cards with text inputs

(0) ShareShare
ReportReport
Posted on by 6

Hello

 

I faced a problem with lack of native loop functionality in copilot studio. For client we are preparing solution which will:
1. Get a JSON data from azure function 

2. Ask user some questions to get missing values

3. Post result using http triggered Azure function

 

In point 2 we have to ask user to fill values for a list of objects like 

 

{
...
 nodes: [
 {
 name: String
 extrenalNumber: String
 },
 {
 name: String
 extrenalNumber: String
 }
 ]
}

 


As a solution we were thinking of
1. using some big dynamic adaptive card which will ask user to fill in inputText required values for all of objects 
2. create a loop that will post adaptive card foreach object 

 

Is there any way to complete such task with copilot studio or we should migrate to Bot Framework?

I have the same question (0)
  • adilei Profile Picture
    on at

    Here is how to work with loops:

     

    kind: AdaptiveDialog
    beginDialog:
     kind: OnRecognizedIntent
     id: main
     intent:
     triggerQueries:
     - loop
     - repeat
     - run again
     - start over
     - do it again
     - try once more
     - give me another round
     - restart the loop
    
     actions:
     - kind: SetVariable
     id: setVariable_2oJevH
     variable: Topic.currItem
     value: "\"\""
    
     - kind: SetVariable
     id: setVariable_z9bKSl
     variable: Topic.items
     value: |-
     =[
     "item1","item2","item3"
     ]
    
     - kind: Foreach
     id: myForeach
     items: =Topic.items
     value: Topic.currItem
     actions:
     - kind: SendActivity
     id: sendActivity_5arpmt
     activity: "{Topic.currItem}"
  • grogal Profile Picture
    6 on at

    How can I create this node:'kind: Foreach'? Is it only available in code editor?

  • adilei Profile Picture
    on at

    For now only in the code editor, yep

  • grogal Profile Picture
    6 on at

    Is there any documentation of this code editor possibilities? 

  • adilei Profile Picture
    on at

    You can try exploring the schema using intellisense:

     

    adilei_0-1716464711564.png

     

  • grogal Profile Picture
    6 on at

    Hello
    I was able to run loop but now I faced problem with saving result of each iteration in some table. Could you advice?

    kind: AdaptiveDialog
    beginDialog:
     kind: OnRecognizedIntent
     id: main
     intent: {}
     actions:
     - kind: SetVariable
     id: setVariable_oKhUX0
     variable: Topic.nodesList
     value: =["Sql connection","Office connector"]
    
     - kind: SetVariable
     id: setVariable_2oJevH
     variable: Topic.currItem
     value: "\"\""
    
     - kind: SetVariable
     id: setVariable_bNfSqP
     variable: Topic.Var3
     value: =[]
    
     - kind: Foreach
     id: myForeach
     items: =Topic.nodesList
     value: Topic.currItem
     actions:
     - kind: SendActivity
     id: sendActivity_6HhMsS
     activity: "{Topic.currItem}"
    
     - kind: Question
     id: question_ZpGOlF
     interruptionPolicy:
     allowInterruption: true
    
     variable: init:Topic.Var2
     prompt: Please provide name
     entity: StringPrebuiltEntity
    
     - kind: Question
     id: question_aJJTv0
     interruptionPolicy:
     allowInterruption: true
    
     variable: init:Topic.Var1
     prompt: Please provide number
     entity: StringPrebuiltEntity
    
     - kind: SendActivity
     id: sendActivity_W12Lmj
     activity: OUT OF LOOP


    BTW I wasn't able to display adaptive card in loop. Code of adaptive card:

     - kind: AdaptiveCardPrompt
     id: MFN51m
     card: |-
     ={
     type: "AdaptiveCard",
     '$schema': "http://adaptivecards.io/schemas/adaptive-card.json",
     version: "1.5",
     body: [
     {
     type: "TextBlock",
     text: "Please put more details",
     wrap: true
     },
     {
     type: "Input.Text",
     id: "testNumber",
     placeholder: "testNumber",
     label: "testNumber"
     },
     {
     type: "Input.Text",
     id: "appName",
     placeholder: "Application name",
     label: "Application name:"
     }
     ],
     actions: [
     {
     type: "Action.Submit",
     title: "Submit",
     data: {
     testNumber: "testNumber",
     appName: "appName"
     }
     }
     ]
     }
     output:
     binding:
     actionSubmitId: Topic.actionSubmitId
     appName: Topic.appName
     testNumber: Topic.testNumber
    
     outputType:
     properties:
     actionSubmitId: String
     appName: String
     testNumber: String



Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 265 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 240 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard