Vue normale

Il y a de nouveaux articles disponibles, cliquez pour rafraîchir la page.
À partir d’avant-hierGanesh Sanap Blogs

Add, update, or delete images in SharePoint/Microsoft Lists using Power Apps

In my previous blog about image columns in SharePoint, I explained all you need to know about New Image column type in SharePoint online including how to create an image column, how to add image to a list item, where the Images will be stored, etc.

Last year Microsoft added support for displaying images from SharePoint Online/Microsoft Lists to Power Apps canvas apps. Now, Microsoft is adding support for adding, updating, and deleting images from image columns in SharePoint online/Microsoft Lists using Power Apps canvas apps.

Newly created canvas apps that have a SharePoint data connection and are connected to a list can use controls that can add, update, or delete images from the SharePoint list. To use the same functionality in existing canvas apps, you have to delete the existing SharePoint data connection and then re-add it to refresh the data schema.

Configure SharePoint Form control to add pictures/images

Follow below steps to configure SharePoint Form control in canvas app to add pictures/images to SharePoint lists:

1. Create a SharePoint online list and then create an image column in the SharePoint list.

2. Go to make.powerapps.com, create a blank canvas app and add SharePoint list data source.

3. Add Form control in app from Insert > Forms > Edit form

4. Set Data Source property of form control to SharePoint list data source and DefaultMode property to FormMode.New

5. Select form control from tree view, click on Edit fields option from Properties panel at the right side of screen.

6. Add your image column to form using + Add field option on Fields panel and select Add picture as a Control type as shown in below image. Power Apps will add Add picture control inside the data card for image column.

Add image column to form and select “Add picture” as control type

7. Add a button control in canvas app and set it’s OnSelect property to:

SubmitForm(Form1)

8. Now when you run the canvas application, you can select an image from your computer using Add picture control and save it to SharePoint list using SubmitForm() function used in button control.

Add, update, or delete images in SharePoint/Microsoft Lists using Power Apps

Using Patch() function to add/update image column using Power Apps

You can also use the Patch() function to add or update an image in image columns in SharePoint/Microsoft Lists using Power apps canvas apps. You can use similar code as given below on OnSelect property of button control:

Patch(
    'Logo Universe',
    Defaults('Logo Universe'),
    {
        Title: TextInputControl.Text,
        Image: ImageControl.Image
    }
)

Delete an image from SharePoint image column using Power Apps

You can delete an image from SharePoint image column using Blank() value for image column in Power Apps Patch function:

Patch(
    'Logo Universe',
    Defaults('Logo Universe'),
    {
        Title: TextInputControl.Text,
        Image: Blank()
    }
)

Limitations

  1. Images up to 30MB in size are supported while adding/updating images.
  2. Below image formats are supported currently while using this feature.

Supported Image formats

Below image formats are supported currently while using this feature:

  • JPG and JPEG
  • PNG
  • GIF
  • TIF and TIFF
  • HEIC and HEIF
  • JPE, MEF, MRW, NEF, NRW, ORF, PANO, PEF, RW2, SPM, XBM, XCF

Release Timeline

  • Targeted Release: Rollout started in late September 2022 (previously early September 2022) and expected to complete by mid-October 2022 (previously mid-September 2022).
  • Standard Release: Microsoft will begin rolling out this feature in mid-October 2022 (previously mid-September 2022) and expects to complete it by late October 2022 (previously late September 2022).

Learn more

I hope you liked this blog. Please give your valuable feedback & suggestions in the comments section below and share this blog with others.

Introducing Embed web part in SharePoint spaces

Tech giant Microsoft is introducing Embed web part in SharePoint spaces which will allow users to show SharePoint pages or HTML page embed content as an interactable overlay on a SharePoint space. Space viewers will see a thumbnail image in the 3D space that can be viewed as a fully functional HTML overlay when selected by the user. Space viewers that are using a mixed reality headset will only see the thumbnail when selecting the web part unless they return to the browser to interact with the embedded content.

This new feature release will allow users to add content such as:

  • Microsoft Forms
  • The PowerPoint embed viewer
  • SharePoint Pages
  • Power Apps

This message is associated with Microsoft 365 Roadmap ID 70732.

Release Timeline

  • Targeted release (selected users and entire organization): Roll out will begin in early November and expect to be complete by mid-November.
  • Standard release: Roll out will begin in mid-November and expect to be complete by late November.

How this will affect your organization

SharePoint spaces authors will see a new embed web part available in the spaces web part toolbox while designing a SharePoint space.

SharePoint spaces authors will see embed web part as shown in below image:

Introducing Embed web part in SharePoint spaces in SharePoint online
Introducing Embed web part in SharePoint spaces

What you need to do to prepare

You might want to notify your users about this new capability and update your training documentation as appropriate.

Learn more

Power Apps can now display images from SharePoint Online/Microsoft Lists

In my previous blog all you need to know about Image column type in SharePoint online, I explained how to create an image column, adding images to SharePoint list items and where the Images will be stored in SharePoint online site.

At the time I wrote that blog, it was not possible to display the images from SharePoint online/Microsoft lists in Power Apps. But, Power Apps image controls can now display images that are stored in image columns in SharePoint online/Microsoft Lists. The Images in Power Apps can be displayed in four different sizes:

  • Small
  • Medium
  • Large
  • Full

This feature is associated with Microsoft 365 Roadmap ID 81986.

How this will affect your organization

New Power apps that use the SharePoint connector to add a list as a data source may display images from the list if they are present in the list. Existing apps can also be updated to show images.

Release Timeline

  • Targeted release will begin rolling out in late February (previously early February) and will be complete by early March (previously end of February).
  • Standard release to all other cloud environments will begin early March (previously early February) and be complete by mid-March (previously mid-February).

What you need to do to prepare

You might want to notify your users about this new functionality and update your training and documentation as appropriate.

Learn more

Add/Update image columns in SharePoint/Microsoft Lists using PnP PowerShell

In my previous blog about image columns in SharePoint, I explained all you need to know about New Image column type in SharePoint online including how to create an image column, how to add image to a list item, where the Images will be stored, etc.

In this blog, I will explain how to create a new list item with image column and update existing list item to update the image column using PnP PowerShell.

Create new list item with Image column

You can use Add-PnPListItem command in PnP PowerShell to create a new item in SharePoint list with Image column:

# Connect to SharePoint online site
Connect-PnPOnline -Url https://contoso.sharepoint.com/sites/spconnect -Interactive

# Get UniqueId of file you're referencing (without this part your image won't appear in Power Apps (browser or mobile app) or Microsoft Lists (iOS app))
$imageFileUniqueId = (Get-PnPFile -Url "SiteAssets/Lists/dbc6f551-252b-462f-8002-c8f88d0d12d5/PnP-PowerShell-Blue.png" -AsListItem)["UniqueId"]

# Create new list item with image column
Add-PnPListItem -List "Logo Universe" -Values @{"Title" = "PnP PowerShell"; "Image" = "{'type':'thumbnail','fileName':'PnP-PowerShell-Blue.png','fieldName':'Image','serverUrl':'https://contoso.sharepoint.com','serverRelativeUrl':'/sites/SPConnect/SiteAssets/Lists/dbc6f551-252b-462f-8002-c8f88d0d12d5/PnP-PowerShell-Blue.png', 'id':'$($imageFileUniqueId)'}"}
Create a new SharePoint list item with Image column in SharePoint online using PnP PowerShell
Create new list item with Image column

Update SharePoint list item with Image column

You can use Set-PnPListItem cmdlet in PnP PowerShell to update existing SharePoint list item with Image column:

# Connect to SharePoint online site
Connect-PnPOnline -Url https://contoso.sharepoint.com/sites/spconnect -Interactive

# Get UniqueId of file you're referencing (without this part your image won't appear in Power Apps (browser or mobile app) or Microsoft Lists (iOS app))
$imageFileUniqueId = (Get-PnPFile -Url "SiteAssets/Lists/dbc6f551-252b-462f-8002-c8f88d0d12d5/PnP-PowerShell-Green.png" -AsListItem)["UniqueId"]

# Update SharePoint list item with image column
Set-PnPListItem -List "Logo Universe" -Identity 12 -Values @{"Image" = "{'type':'thumbnail','fileName':'PnP-PowerShell-Blue.png','fieldName':'Image','serverUrl':'https://contoso.sharepoint.com','serverRelativeUrl':'/sites/SPConnect/SiteAssets/Lists/dbc6f551-252b-462f-8002-c8f88d0d12d5/PnP-PowerShell-Green.png', 'id':'$($imageFileUniqueId)'}"}
Update SharePoint list item with Image column in SharePoint online using PnP PowerShell
Update SharePoint list item with Image column

Note: This blog post is updated based on the updates to PnP script sample at Add/Update Image in SharePoint Image column so that added/updated images will work in Power Apps or Microsoft Lists mobile app.

Learn more

❌
❌