cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ComputerHabit2
Helper V
Helper V

Using Content Types in Forms

I'm attempting to mimic how Content Types worked before PowerApps. 

 

I have two content types.  I added the ContentType DDL to my form, copied it and created a second form.  Each form has a Visible = true field.  I tried some logic with an if statement and using the Content Types data card and it sort of worked.  The problem is that each form has its own data card for Content Type. 

 

Now I either need to make logic for each forms visiblity or come up with code outside of the forms that could retain the content type.  I'd prefer to have something outside of the form to do my comparison.  I know there are variables but really haven't figure out how to use them yet. 

 

Is it possible to store form data somewhere outside the form to do the visiblity of a form?

1 ACCEPTED SOLUTION

Accepted Solutions
ComputerHabit2
Helper V
Helper V

Okay I got it to work. 

 

  • I added the Content Type datacard, moved it to the top. 
  • I renamed the DataCardValue to something I'd recognize.
  • I had to unlock the datacard for each column I wanted to hide.
  • I then changed the Visible properties of each datacard.
    If(ContentTypeDataCardValue.Selected.Name = "Name of Content Type",true,false)

 

The idea being that you'd show for the default content type and hide depending on the Name value of the Content type.  I figure if you had several content types you could do a Switch instead.


 

View solution in original post

4 REPLIES 4
ComputerHabit2
Helper V
Helper V

Okay I got it to work. 

 

  • I added the Content Type datacard, moved it to the top. 
  • I renamed the DataCardValue to something I'd recognize.
  • I had to unlock the datacard for each column I wanted to hide.
  • I then changed the Visible properties of each datacard.
    If(ContentTypeDataCardValue.Selected.Name = "Name of Content Type",true,false)

 

The idea being that you'd show for the default content type and hide depending on the Name value of the Content type.  I figure if you had several content types you could do a Switch instead.


 

View solution in original post

Hey @ComputerHabit2 

 

 

I know it has been a long time, but could you explain a bit more how you would implement that Switch into your app to show and hide fields depending on the selected content type?

 

Kind regards

 

Tom



If this reply has answered your question or solved your issue, please mark this question as answered.

Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

I never quite finished that form.  I will have to revisit this thought.  Since MS took SharepointDesigner Forms and Javascript away I'm stuck.

Hey @ComputerHabit2 

 

 

No problem, I want to do something similar and was wondering how far your app went.

 

Kind regards

 

Tom



If this reply has answered your question or solved your issue, please mark this question as answered.

Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,025)