cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simms7400
Post Prodigy
Post Prodigy

ComboBox Issue - will not source a default

Hi Folks -

I'm trying to add a ComboBox to an EditForm of mine, particularly within a DataCard.

The EditForm sits on a SP List called "rdActivity".

 

Ultimately, if an end user insitaites a change request, the ComboBox needs to populate with the current data element from the "Parent_Node" SP List column from "rdActivity".

 

In the screen shot below, I have the ComboBox off to the side right now just to validate, but furture state will be the ComboBox will overlay the "Parent Node" node and then the"Parent Node" DataCardValue field will be "ComboBox2.Selected.Value"...

 

helo.jpg

 

The form right now is reading in all columns related to PFP-A1217500 thereofore the ComboBox should be populated with PFI-00590-10159 as showns in the "Parent Node" field above.

 

My ComboBox is a collection.

 

Weird that the DefaultSelectedItems validates but doesn't return anything. Any ideas? Thank you!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@simms7400 

Yes, makes sense...I'm reviewing that from your photos now.

 

So, this begs the question...what value do RD_Target_List and RD_Investment_List play in this?  If they don't have a corresponding Parent_Node (which is what you are trying to get), then they will only have part of what you want...a name.

 

Are you saying that you want to get (let's stick with one list at the moment) all of the Name values from RD_Target_List, then find all of the Parent_Node values from the rdActivity list where the Name values are equal?

If that's the case, then you could change your formula for the collection to this:

Clear(ListActParentList); 
Collect(ListActParentList, 
           AddColumns(
               ShowColumns(
                   Filter(RD_Investment_List, Portfolio_Status<>"Terminated"), 
                   "Name"),
               "Parent_Node", Lookup(rdActivity, Name=RD_Investment_List[@Name]).Parent_Node
            )
         );
Collect(ListActParentList, 
           AddColumns(
              ShowColumns(
                  Filter(RD_Target, List,Portfolio_Status<>"Terminated"), 
                  "Name"), 
         "Parent_Node", Lookup(rdActivity, Name=RD_Target_List),Parent_Node
           )
        )

Now...some adjustment might be needed on that formula.  I'm just shooting from my head (at least not at it 😉 )

 

But, I'm not sure if that is in fact what you are looking for.  And, I don't know how that might play into any duplication or similar records.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

29 REPLIES 29
simms7400
Post Prodigy
Post Prodigy

rdActivity Table:

table.jpg

RandyHayes
Super User III
Super User III

@simms7400 

Your DefaultSelectedItems property is using a lookup, which will, in this case return a record.

Try changing the formula to :  Filter(rdActivity, Parent_Node=ThisItem.Parent_Node)

 

I hope that helps you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

 

I used that formula but no results. One thing to note, the "Default" propery of my "Parent Node" card is a variable called "PFPParent".

The reason I do this is because an end user is directed to this from from up to (3) galleries. Therefore, I set the gallery selection to the variable "PFPParent" and then display it when I get to this form.

 

I also tried this with no luck:

act.jpg

@simms7400 

Are we saying perhaps that Parent_Node has no value??  If so, then possibly changing the formula to this:

   Filter(rdActivity, Parent_Node=PFPParent) 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

 

Strange, I tried that logic as well and still no result.  This is a head scratcher...

@simms7400 

What is your Value display set for on the ComboBox (in the properties pane)?  Perhaps you're not seeing anything based on the chosen value.

What is the Items property set to?

Your Items property should be all the possible values you want to display in that combobox.  That really should be the Filter(rdActivity, Parent_Node=PFPParent) formula. 

The DefaultSelectedItems property will determine which ones are "selected".

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

 

Here is my collection for the ComboBox:

Clear(ListActParentList);
ForAll(
Filter(RD_Investment_List, Portfolio_Status<>"Terminated"),
Collect(ListActParentList, Name)
);
ForAll(
Filter(RD_Target_List,Portfolio_Status<>"Terminated"),
Collect(ListActParentList,Name)
)

I wonder if the issue is the collection and the way it's returning vs how the combobox needs  it...

@RandyHayes 

 

For my ComboBox Items property, it's set to my collection:

ListActParentList

@simms7400 

First, does ListActParentList have any values in it?  Go into the View->Collections and look at that collection to see that it has data.  

Then, if it does, make sure the Fields of the combobox are set to Value (which should be the name of the only column in your ListActParentList collection).

If all of the above are good, then you should see values in the combobox regardless of the DefaultSelectedItems.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

Users online (2,972)