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 / Lock File Field With B...
Power Apps
Answered

Lock File Field With Business Rule

(0) ShareShare
ReportReport
Posted on by
 

Hi All,

 

I am creating a new custom table that has a field that has a datatype file. I want to make the field become read-only or lock the field after the user uploads a file. I have a field that will be used as a flag that will be changing after a file is uploaded. I want to use the flag as a condition in the business rule, and I realized that the file field is not listed in the business rule. Does anyone know how to change the file field to become read-only, after the file is uploaded? thanks.

I have the same question (0)
  • Verified answer
    Prakash4691 Profile Picture
    1,332 on at

    @Anonymous ,

     

    It looks like for file type haven't been include in BR.

     

    Try using javascript, included sample code below, 

     

    function onChange(executionContext) {
    var formContext = executionContext.getFormContext();
    var optionSetControl = formContext.getAttribute("cr5b9_find");
    if (optionSetControl) {
    if(optionSetControl.getValue() == 4)
    formContext.getControl("cr5b9_filetypecolumn").setDisabled(true);
    }
    }

     

    If it answers your question, kindly give kudo and accept it as solution.

     

     

    Regards,

    Prakash

  • Ram Prakash Duraisamy Profile Picture
    5,593 Super User 2025 Season 2 on at

    Hi @Anonymous,

     

    Please make sure the FLAG Field is SEARCHABLE. If its not, enable searchable and Publish the customization then you can use the Field in Business Rule easily as per your expectation

     

    rampprakash_0-1630430083624.png

     

  • Community Power Platform Member Profile Picture
    on at
     

    @rampprakash The flag field is already searchable and shows in the business rule, but the file field is not showing in the business rule.

  • Community Power Platform Member Profile Picture
    on at
     

    @Prakash4691 Thanks for your idea I will accept it as solution!

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard