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 / Power Apps / Using .Predict to rese...
Power Apps
Unanswered

Using .Predict to reset a label

(1) ShareShare
ReportReport
Posted on by 2
Hiya, 
 
I am experimenting with custom prompts in power platform,  for example a txt label and input using the custom prompt show top 10 items. 
 
on the label ive placed  'Top 10 List Items '.Predict("txt_thing").Text
 
and I was creating a reset button for the label, Reset(txt_result) but it keeps showing an error on the reset. any suggestions how to reset this
 
thanks!
 
Categories:
I have the same question (0)
  • TYL Profile Picture
    1,091 Super User 2024 Season 2 on at
    Hi! What I can recommend is to use a Set() function to set a variable with the output of your AI prompt (e.g., Set(VariableName, 'Top 10 List Items '.Predict("txt_thing").Text). Afterwards use this variable in your label, as label value. When you want to remove the value, simply Set your variable value to Blank(). E.g., Set(VariableName, Blank()). This will remove the value that was originally stored from AI. 
     
    This is much easier than directly using the AI output in the label.
  • Nirav Raval (Akira28) Profile Picture
    153 Moderator on at
    You can even use the below method for implementation by going one by one steps.

    1) Text Input (OnChange)
         Set(varTopItems, Predict(txt_thing.Text).Text)
     
    2) Label Control (Text Property)
        "Top 10 List Items: " & varTopItems

    3) Reset button (OnSelect)
         Set(varTopItems, Blank())
     
     
    If this post solved your issue, clicking 'Does this answer your question' will help others discover the solution and close the topic. If you found it helpful, a Like would be awesome!

    Regards,
    Nirav J Raval (Akira28)




     

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 > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard