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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / define data field when...
Power Apps
Unanswered

define data field when loading form

(0) ShareShare
ReportReport
Posted on by 9

Hi,

 

When I load a new edit form I would like to automatically set the data field "Category" to a particular value "Corrective". I was trying to use the function of "OnVisible" of the editform and set the logic to Gallery1.Selected.Category = "Corrective". But this doesn't seem to work.

 

I can visualize the field to my screen and set the logic, but I don't want this field to take up any screen space, so I would prefer to define the field when the form is loaded.

 

Any suggestions? 

Categories:
  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @Nihu ,

    You did not say whether you were displaying the field in your form and if so, what type of control you are displaying it in. If for example you simply want to set it, just have a Text control with the Default "Corrective" and it will save when the form is submitted. If not, can you please provide more details on how it is displayed.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Nihu Profile Picture
    9 on at

    Hi Warren,

     

    Thanks for the reply. I am familiar in using the default function when the value is displayed. In this scenario I don't want to display the field in my form as I don't want it to occupy my screen space. I would like that this actions takes place in the background (preferably when loading the EditForm screen).

  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @Nihu ,

    Then OnSelect of the Gallery

    Patch(
     ListName,
     ThisItem,
     {Category: "Corrective"}
    );
    Navigate(. . . . 

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard