Forum Discussion

BazVanDenDungen's avatar
BazVanDenDungen
Copper Contributor
May 26, 2022

Is it possible to use a button embedded within a thumbnail card to trigger another search?

I have a solution which aims to provide a search experience for a user that will also enable them to search for "related" items.

 

I would like this to function where the user is presented a button in their search response to trigger a new search with different query parameter. Something like "relatedto: X".

 

What would be the best method to use for this?

 

    • Meghana-MSFT's avatar
      Meghana-MSFT
      Icon for Microsoft rankMicrosoft

      BazVanDenDungen - Could you please share the below details,

      1. What component are you using for implementing the search functionality
      2. Please share the JSON of the thumbnail card
      3. Please share the repro steps or document that you are following.
      • BazVanDenDungen's avatar
        BazVanDenDungen
        Copper Contributor

        Meghana-MSFT 

         

        1. I am using Search Extensions to provide the user with a search experience through the command bar and compose areas of teams.
        2. I am currently in the exploration phase and am using the C# Microsoft.Bot.Schema library to create my thumbnail cards. Below is the C# that i am currently using to return search results.

        var previewcard = new ThumbnailCard
        {
            Title = result.Title.Raw,
            Text = result.Description.Raw,
            Subtitle = result.Source.Raw,
            Images = new List<CardImage> { new CardImage { Url = "https://<url>.ngrok.io/extensionDOCX_x256.png" } },
            Buttons = new List<CardAction>
            {
                new CardAction(
                        "openUrl",
                        "WebDav Link",
                        value: "<webdav url for document>")
                }
            }
        };

         3. I don't really have any repro steps as I was doing research and found documentation on the ListCard but noticed that it was unsupported for teams bots. 

         

        I am vaguely aware that teams has some functionality for having bots trigger popup windows but i cannot find the documentation for that feature again.

Resources