Friday, April 28, 2023

Thursday, April 13, 2023

Extracting text from a column and comparing on that column

 SortByColumns(Filter(coll_Area,   Result in Filter(AddColumns('Maintenance Notification',"AreaName",Trim(

     Last(FirstN(Split('Functional Location', "-"),4)).Value))

,("LUX-"&cmb_filerFuncLocation.Selected.Value) in 'Functional Location' ).AreaName || Result in Filter('Maintenance Notification',("LUX-"&cmb_filerFuncLocation.Selected.Value) in 'Functional Location' ).Area),"Result",SortOrder.Ascending)


Monday, April 10, 2023

Setting horizontal image gallery based on attachments


In the gallery image control set below:


 If(

   Last(Split(ThisItem.Name, ".")).Value = "jpg" || Last(Split(ThisItem.Name, ".")).Value = "png" || Last(Split(ThisItem.Name, ".")).Value = "jpeg",

  ThisItem.Value,

   'google-docs'

)

Setting Display Field in a combo box

 Suppose we have a combobox having items property set to some complex calculation, we can set the display fields using Advanced properties of the combobox as below:

In my case "Result" column I want to display in my combobox





Monday, April 3, 2023

Check if user profile image exists else apply a default profile

 Coalesce(ThisItem.ProfilePicture,  If(

            Office365Users.UserPhotoMetadata(ThisItem.Email).HasPhoto = true,

            Office365Users.UserPhoto(ThisItem.Email),

            'profile')

           )


Get user profile picture image in PowerApps

 Use the below formula in Image control

Office365Users.UserPhotoV2(<your email>)

Add additional option to combobox in powerapps

Suppose you have a collection col_AllEmployeeResults & you are showing Title & Email fields in combobox. You want an additional Select option to show in the combobox. Put below in the Items property:


Ungroup(

    Table(

        {items: Table({Title: "Select", Email: "Select"})},

        {items: ShowColumns(Filter(col_AllEmployeeResults, IsActive <> false), "Title", "Email")}

    ),

    "items"

)

Add Service Principle support in Custom Connector

  then search for "Streamlining Integration: Using Service Principal authentication on Custom connectors with Microsoft Graph Applicati...