@RandyHayes I accepted the solution in the other thread and am starting this one up as my path forward has changed, and I wanted to be clear on the ask I have. The other thread got confusing cause I was changing how I wanted to set it up.
Two SPO Lists.
Assignements
Engineers
Assignments has an AssignedTo column, that is a lookup column to Engineers.Title.
Engineers.Title has the SMTP address of the user.
I have found that for some of my users, Teams does NOT use the primary SMTP of the user.
So for some of my users, User().Email will NOT match Engineers.Title.
So what I did was create another column in Engineers called UPN. Added that secondary email there.
Here is what I am trying to accomplish now.
Currently, when a user comes in, they can search for their address.
What I want is for the current user to hit this screen, and there is no search or list, it is just defaulted to their email address. They no longer get the option to search or a list of users. It is just automatically filled with their Primary SMTP.
I figured the only way to do this was to somehow grab User().Email in PowerApps.
Lookup Engineer.UPN and where it matches User().Email, it should RETURN Engineer.Title as the defaulted user.
I have tried this a few different ways. I keep running into issues like you can't compare text to record, etc. My searches always fail because I think User().Email is text. I even tried inputing that into a hidden text input and trying to compare, still would not work.
At one point, I believe I switched the datacard to a datasource of Engineers. I was able to get the user to default, but when I went to submit the data to Assignments, it would post everything except AssignedTo. I did not understand why this was happening.
So, is this possible and if so, what is the best way to go about this?
Correct, and sorry. I am the one that caused all the confusion.
Yes, if we can get it so it does nothing else but defaults to the current user, that would be great.
If that is not possible, then it defaulting to the current user, with the ability to pick someone else would be fine.
Thanks again man, I will catch you tomorrow.
Hmmm, then I'm a little confused on the purpose of the combobox. I thought you wanted the ability to search for other users to change the assigned to?
Are you not wanting the capability to choose other assigned to users?
(BTW: I'm wrapping for the night...so I will get back to you tomorrow on your response)
Yep, that worked. I still have the ability to choose others.
It populates with the correct title, but if I click the drop down, I can still search for others (would rather not have that if possible).
And it posted to the SPO List!!
Where you want that at?
So then we need to determine if the DSI is producing a record. Let's short-circuit it and use this formula:
LookUp(Engineers, Title="enter a known title here")
See if that at least has the correct user for the known user selected.
@RandyHayes so that brings back the list of engineers, it doesnt just prepopulate the box with the current user.
We want to have it so nothing shows up, except for the current user Engineer.Title.
Adding another lookup column for the UPN is only going to complicate things even more.
That filter formula you have is restricting all the table results to just an AssignedTo column. You need to have the ID and Title of the Engineers list in order to generate your Lookup value in the Update. So, your Items property needs to provide it.
Your Items property on the Combobox should be: Engineers
The DefaultSelectedItems property should be:
Coalesce(
LookUp(Engineers,
StartsWith(Title, ThisItem.AssignedTo.Value) || StartsWith(UPN, ThisItem.AssignedTo.Value)
),
LookUp(Engineers,
StartsWith(Title, User().Email) || StartsWith(UPN, User().Email)
)
)
Your DisplayField should be ["Title"]
Your Update property on the AssignedTo_DataCard2 needs to be:
With(DataCardValue11.Selected, {Id: ID, Value: Title})
That should be all you need. Try them out exactly like above and see where you get.
@RandyHayes kind of back where I started of getting no results.
So, to eliminate the need to look at the Engineers list, I created that other lookup column.
So now, Assignments List has...
AssignedTo which is a lookup to Engineers.Title
UPN which is a lookup to Engineers.UPN
Working with this filter but getting no results
Filter([@Assignments],UPN.Value = User().Email).AssignedTo
I think I can make things easier.
For the Assignments.AssignedTo column, it is a lookup column to Engineers.Title.
In SPO, I added an additional column to look up, UPN.
It then added another column for UPN, and is pulling back Engineers.UPN.
So we should be able to focus on just this SPO list, Assignments.
@RandyHayes , Ok, I got a bit closer.
So I THINK I got the items to filter on User().email, compare it to UPN and RETURN Title.
When I did it this way, The only choice to choose from was the correct choice, but I still had to choose it.
I tried a few combinations in the DefaultSelectedItems as well as Default, but nothing worked, kept getting errors.
The other thing is, like before, when I click on Submit, it creates the SPO record in Assignments, but it does NOT enter in the AssignedTo field, which is the SMTP.
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473