Skip to main content

Notifications

Copilot Studio - General
Suggested answer

Copilot Bot - Error: Empty Collection

(0) ShareShare
ReportReport
Posted on by 2
Copilot Bot - Multiple Single Select lists used in an Adaptive Card where Select item hides if empty
 
I have used Copilot Bot - Multiple Single Select lists used in an Adaptive Card where Select item hides if empty. The query also uses the CHATGPT prompt to get variables and statements into Arrays or Tables. 
 
It constantly gives an error says, Condition: There is an error: Empty Collection. 
 
I have checked there are no empty Tables in the code. I am not sure if the error is because of the Adaptive Card or GPT prompt returning tables to the Bot. 
 
 
Please advise!!
 
Thanks 
Ritesh Waghray 
Categories:
  • RW-09101245-0 Profile Picture
    RW-09101245-0 2 on at
    Copilot Bot - Error: Empty Collection
    Hi Vinoth,
     
    Thanks for your prompt response. I wonder is it possible for us to get on a Teams call so that I can show you the issue. 
    Moreover, I also feel that MS must work on a Single Select option list where when the option value or label is empty it must hide the contents. 
    Kindly let me know when can we get on a call to solve this. Many thanks!
     
    Regards
    Ritesh Waghray,
    Kyndryl.   
     
     
  • Suggested answer
    Vinoth Selvam Profile Picture
    Vinoth Selvam 1,278 on at
    Copilot Bot - Error: Empty Collection
    Dear Ritish,
     
    Please provide more details on the steps that you followed to create the topic.
     
    With this information it is very hard to identify the issue.
     
    Here are my suggestion,
     
    • Ensure that all data sources (arrays/tables) returned by the GPT prompt and used in the adaptive card have valid values and aren't empty.

    • Before rendering the adaptive card, add condition checks to verify that the arrays or tables you're using contain data. For example, in Power Automate, you could use a conditional statement to check if the array is empty before proceeding.

    • Temporarily remove sections of your card or the data bindings one at a time to identify the specific part causing the issue.

    • Provide a default or fallback message in case the GPT response returns an empty result.

     

    Hope it helps.

     
    Thanks.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard