0

I have a communication online SharePoint site, and i want to implement this user experience :-

  • The user will create a new list item >> select a checkbox.

  • If the checkbox is checked >> he will have to enter 3 managed metadata fields (A,B & C).

  • If the checkbox is not checked >> he will have to enter 2 different managed metadata fields (D & E).

  • After entering the above >> he will enter another set of managed metadata fields (F & G)...

so can anyone advice if i can achieve this using power apps? now if i am inside classic UI, i would do this by editing the list's new and edit forms and add some javascript code to show/hide fields accordingly. but in modern UI not sure if power app support this?

Thanks

3 Answers 3

1

It is supported in PowerApps.

I’ve tested in a simple list with 5 single line of text fields, named A~E. For example, when I check the Checkbox control, the field A and B will be invisible and be replaced by fields C~E.

Please see the steps below:

  1. Select Data Card for field A and switch to “Visible” under properties.

  2. Type If(Checkbox2.Value=false,true,false) for field A and field B, then type If(Checkbox2.Value=true,true,false) for field C~E.

  3. Adjust the positions of the Data Cards.

enter image description here

Here’s the outcome.

enter image description here

Here’s your reference:

PowerApps - How To Hide And Show A Card Based On A Certain Condition In The App.

0

Chelsea_MSFT has the right answer, but just a couple other points:

  1. You mention "have to enter". Just pointing out that fields have a required property that can be set exactly the same way, so you can set fields to be conditionally required.
  2. PowerApps, for an inexplicable reason, runs these rules in design view while you're building your form. This means that some of your fields will be invisible since the condition isn't met. (again, in design view). A common workaround is to have a separate admin screen with a checkbox or some other system to set a variable. Then, for conditional visibility, the expression would be something like:

    If(varAdmin, true, Checkbox2.Value=false,true,false)

With the above, you could set the variable varAdmin to true, which would enable you to see all fields on the screen while you're trying to work on it, and then simply switch that variable to false to see how the user would experience it.

  1. Instead of putting the same visibility formula in each card, you can simply reference card1.visible from card2.visible. This means that the actual formula would only exist one place, and every other card that needed to be shown at the same time would simply reference that one card. Considering how difficult power apps makes it to figure out what's going on in an app, things like this make maintenance easier over the long term.
0

I just have the perfect solution for you, it's called "Cascading Dropdown" !

Please refer to Mr Shane Young which i find him very professional guy, and here the link: PowerApps Cascading Dropdown, here you will find exactly what you want and more !

Good luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.