Power Apps Exchange

Please login or click SIGN UP FOR FREE to create your PowerAppsUG account to join this user group.
 View Only

Office365Users-Function referal

  • 1.  Office365Users-Function referal

    Posted Jan 21, 2022 08:57 AM
    Hi everyone
    In a Canvas form app (linked to SharePoint), I am trying to get information of a selected user (using the Office365Users-function) and fill this automatically into another field.
    Now, I have the following (probably beginner) issues:

    Scenario 1)
    When I create a (person) Combobox field and make a dropdown there to list all people within my organization, I use the following function: (    Office365Users.SearchUser({searchTerm:DataCardValue7.SearchText, top:50})   ).The value box with the person shown is called DataCardValue7.
    --> This works very well and I can access everyone.

    Scenario 2)
    However, if I use the premade (person) Combobox that was created through a column of a SharePoint list, the Item shows something like (    Choices([@'Access Updates'].'Whose access shall be replaced?')    ). The value box with the person shown is called DataCardValue4.

    When I try now to get the country (scenario 1) of the desired user in a separate datacard label, I use this function: (  DataCardValue7.Selected.Country  ), which works fine.
    However, in Scenario 2 when I try to use (    DataCardValue4.Selected.Country    ) I get the issue: "Name isn't valid. This identifier isn't recognized (...) Location: DataCardValue6.Text". Do you know how I can fix this, as I would prefer not to create a separate Combobox if I can refer directly to a premade one.

    Furthermore, I would like to show the selected user picture next to DataCardValue4, resp. DataCardValue7. I tried to use this function in an added image-field: (  Office365Users.UserPhotoV2(DataCardValue7.SelectedItems.Mail)   ) and also played around a little bit with it. However, I am unable to get any kind of picture (Error: Invalid argument type (Table). Expecting a Text value instead). How am I able to fix this?

    I need to mention that I am quite new to PowerApps. However, in any tutorial I find for faced issue, I can only find formulas that can be used within a gallery or for the currently logged-in user.

    I would really appreciate it if anyone can help me out here and send kind regards into the forum :)

    Sandro Betschart