cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WorkHard
Helper III
Helper III

If form is New, limit the combobox list to 1 predetermined value

I have a workflow that requires a new item to be entered initially with the Status = Open.

 

So let's say my Status can be = Open, In Progress, Closed.
I load these options in the comboBox with:

 

Items:

Choices([@'My Sharepoint List'].'Ticket Status')

Default Selected Items:
Parent.Default

This works great but how can I force the comboBox to display Open and hide the other two options when the form is New?

I tried:
Default Selected Items:

 

If(EditForm1_.Mode = FormMode.New,Filter('My Sharepoint List','Ticket Status'.Value="Open"),Parent.Default)

 

 

But I get an error saying 

WorkHard_0-1624906699411.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jcook
Super User
Super User

Hello @WorkHard 

 

Use this on the DefaultSelectedItems

 

If(
   EditForm1_.Mode = FormMode.New,
    { Value: "Open" },
    Parent.Default)

 

 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

4 REPLIES 4
Jcook
Super User
Super User

Hello @WorkHard 

 

Use this on the DefaultSelectedItems

 

If(
   EditForm1_.Mode = FormMode.New,
    { Value: "Open" },
    Parent.Default)

 

 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

TheRobRush
Super User
Super User

Just curious, would it not be easier to set the default item to open always, and just hide the combo box via visibility, or set its mode to disabled or view when form mode is new? That way your user's wouldn't have a clickable combo box with only option inside of it for new forms, seems like easier way to accomplish this.

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

Thanks. Yes, that would indeed make more sense but the truth is, I try to break down my questions and make them very simple to understand and respond to.

 

In my real project, that status depends on many more factors and each does some action. 

Thanks. I also had to do:

 

If(
   EditForm1_.Mode = FormMode.New,
    ["Open"],
    Parent.Default)

in the Items property to limit to Open only.  

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

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
Top Kudoed Authors
Users online (1,881)