cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mitsch
Frequent Visitor

Set Datacard READ ONLY once a Value is selected from a Selection List

Hi Folks,

 

Is there a Possibility to set a "DataCard" as READ ONLY within the EDIT SCREEN  once a value from a dropdown list is selected ?

There is only one selection possible in my Case

 

1) Selection empty  = Selection should be possible here

 

Mitsch_0-1636558890307.png

 

2)  Selection Process

 

Mitsch_1-1636558928199.png

 

3) Once a Value is selected this DataCard should be READ ONLY

 

Mitsch_2-1636558974813.png

 

Best Regards

Michal

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PTBBSolutions
Solution Supplier
Solution Supplier

Hi @Mitsch ,

 

Yes, you can do that.

 

On the OnChange event of the Dropdown you can put something like:

If(
    !IsBlank(Self.Selected.Value),
    Set(
        VarSelection,
        true
    ),
    Set(
        VarSelection,
        false
    )
)

 This will create a boolean variable.

 

Change the AllowEmptySelection to true.

 

In your form, select the datacard you want to disable, go to Advanced and Unlock to change properties.

 

After that go to the DisplayMode of the same datacard and put this:

If(
    !VarSelection,
    DisplayMode.Edit,
    Disabled
)

Hope this helps.

View solution in original post

2 REPLIES 2
PTBBSolutions
Solution Supplier
Solution Supplier

Hi @Mitsch ,

 

Yes, you can do that.

 

On the OnChange event of the Dropdown you can put something like:

If(
    !IsBlank(Self.Selected.Value),
    Set(
        VarSelection,
        true
    ),
    Set(
        VarSelection,
        false
    )
)

 This will create a boolean variable.

 

Change the AllowEmptySelection to true.

 

In your form, select the datacard you want to disable, go to Advanced and Unlock to change properties.

 

After that go to the DisplayMode of the same datacard and put this:

If(
    !VarSelection,
    DisplayMode.Edit,
    Disabled
)

Hope this helps.

Mitsch
Frequent Visitor

HI PTBBSolutions,

That works like a a Charm  - Thank you very much !!

 

Greetings Mitsch

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,753)