cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Filter( = invalid argument

Hello! I am officially at my wit's end. I have been looking through countless questions and tutorials to try to figure this out. Basically, my end goal is to auto-populate a name from the original edit sheet to a redirected sheet that has more specific information for what that individual needs. I've tried the Lookup( formula and now Filter. Both are giving me the same result with (=) being an invalid argument. I feel like I'm bashing my head against a wall. Please help. Thanks in advance! 

This is the formula I have been trying to use under Items:

 

Filter('Required Training for Residential Staff', 'Staff Name' = DataCardValue10.Selected.DisplayName)

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Hey @RandyHayes ! Thank you for responding so fast!

 

Ok, I want to clear some things up. 

 

1. I am working off 3 Sharepoint Lists. All three are connected to my datasource. This Filter is only using 2 of the 3 sources. 

2. The columns are People columns

3. I was inputting the formula under Items when my combobox was selected. 

4. The initial data is being put into EditForm. I created a second Editform. They are rerouted to the second form if they select specific criteria. 

 

I think I answered all your questions. I tried both of your solutions. I love the idea of referencing it, but it didn't update my SharePoint list when I submitted and that's problematic. I'm attaching a screenshot so you can see the new message I'm getting. 

View solution in original post

7 REPLIES 7
RandyHayes
Super User
Super User

@Anonymous 

You're not entirely clear on what your datasource is or what kind of columns these are, or even where you are putting this formula, but, going on an assumption that this is SharePoint and that your Staff Name column is a person column.

Also, not sure if you are referring to an EditForm that you are working with or what...BUT...beside all of those questions and potential pitfalls, the formula would probably resemble something like this:

Filter('Required Training for Residential Staff', 'Staff Name'.DisplayName = DataCardValue10.Selected.DisplayName)

However, if you are simply trying to get the DisplayName of the person selected in the DataCardValue10 combobox, then you need only reference it.  For example, if you were putting this in a Label control, you would set the Text property to DataCardValue10.Selected.DisplayName and it would give you that value.

 

I hope this is helpful for 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!
Anonymous
Not applicable

Hey @RandyHayes ! Thank you for responding so fast!

 

Ok, I want to clear some things up. 

 

1. I am working off 3 Sharepoint Lists. All three are connected to my datasource. This Filter is only using 2 of the 3 sources. 

2. The columns are People columns

3. I was inputting the formula under Items when my combobox was selected. 

4. The initial data is being put into EditForm. I created a second Editform. They are rerouted to the second form if they select specific criteria. 

 

I think I answered all your questions. I tried both of your solutions. I love the idea of referencing it, but it didn't update my SharePoint list when I submitted and that's problematic. I'm attaching a screenshot so you can see the new message I'm getting. 

View solution in original post

@Anonymous 

So, just to be clear on terminology, you have 3 datasources (each list is a datasource). 

You have multiple EditForms that contain the same record and from the same datasource, just a different set of fields based on selected criteria from the first?  Or is it that each EditForm is for a different datasource and, if they enter certain criteria in the first form, then they go to another form that will edit/create a record in another datasource BUT you want to pre-populate values based on the values from the first form?

 

Let's start with that clarification first so I don't take us down the wrong road.

_____________________________________________________________________________________
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!
Anonymous
Not applicable

Hey!

 

Yes!

 

3 sources. Each list is a source. 

 Each EditForm is a different source and yes, I want to make it so that if they enter certain criteria in the first form, then they go to another form that will edit/create a record in another datasource BUT you want to pre-populate values based on the values from the first form? Specifically, their names that they are typing into the first form. It feels redundant to make someone type in their name twice within the same App. 

Anonymous
Not applicable

@RandyHayes 

Not sure if my response notified you because I forgot to tag you. My apologies. See my response above 🙂

@Anonymous 

Yep, I got it...

 

Okay, then in this case, first, I would remove the customized version of the datacard you have on the second form at this point.  Then add the column you want back in and unlock it.

Then I would set the Default property of your DataCard to the following:

   If(yourSecondForm.Mode = FormMode.New, DataCardValue10.Selected, ThisItem.'Staff Name')

This will set the person from the first form into the second when you are creating a record, otherwise it will display the value that has been recorded in the list when you are editing/viewing.

 

That should be all you need to do.  All the rest of the pieces will happen for 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!
Anonymous
Not applicable

@RandyHayes 

YOU ARE A GENIUS! 

 

Thank you so much! Only thing I will say is that it populated in the DefaultSelected property for anyone else that may need this in the future. 

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.

Users online (2,455)