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
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,426)