Hey all,
When my app starts I am getting an error:
Office365Users.UserPhoto failed: The function 'UserPhoto' has an invalid value for parameter 'userId' - a blank value was passed to it where it was not expected. Please make sure that a valid argument is passed to the function.
This is because I have an image placeholder but no user selected
If(
!IsBlank(Image2),
Office365Users.UserPhoto(userSelect.Selected.UserPrincipalName)
)
So I thought if no user is selected, then use a default image. I created a new Image called Image3 and gave it an image

I have tried a few variations but not getting it to work
If(
!IsBlank(Image2),
Office365Users.UserPhoto(userSelect.Selected.UserPrincipalName),
Image3
)
If(
!IsBlank(Image2),
Office365Users.UserPhoto(userSelect.Selected.UserPrincipalName),
Image(Image3)
)
If(
!IsBlank(Image2),
Office365Users.UserPhoto(userSelect.Selected.UserPrincipalName),
Image {
Image: Image3
}
)
Any idea how I can achieve this? The Image3 is just an idea, if there is a better way to stop getting this error then happy to look at that 🙂
Thanks