Vue normale

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

Power Platform: New Analytics Capabilities for the Power Platform!

Power Platform Analytics is evolving to incorporate insights on the adoption and usage status of Power Apps, Power Automate, and Agents within an organization over the last 28 days. It provides a summarized report by core Power Platform workload, followed by an inventory of Apps, Flows, and Agents:

This new usage Analytics is currently in Preview and, for now, only provides a snapshot of the last 28 days with no option to change the time range.

[Eventos]: Participaré en el Global Bootcamp 2026 de Barcelona!

Este sábado tendré el honor de participar en la edición 2026 del Global Bootcamp de Barcelona en la que realizaré dos sesiones un tanto diferentes. La primera, como no, focalizada en Agentes en el ámbito de SharePoint que en unos días cumple 25 años.

La segunda, como parte del patrocinio de RICOH España, estará orientada a Vibe Coding en la Power Platform.

Agradecer al equipo organizador (Jonathan, Carlos, Toni, entre otros) por contar conmigo en el evento y a mi empresa por hacer posible que participe como Speaker y también se patrocinador platino. Nos vemos este sábado.

Power Platform: Nuevas Capacidades de Analytics para la Power Platform (I)!

El Analytics de Power Platform está evolucionando para incorporar el punto de vista del estado de la adopción y uso de Power Apps, Power Automate y Agentes en una organización durante los últimos 28 días. Se muestra un informe resumido por workload core de la Power Platform y luego un inventario de Aplicaciones, Flujos y Agentes:

Este nuevo Analytics de uso está actualmente en Preview y por el momento da una foto en los últimos 28 días sin posibilidad de poder cambiar el rango de tiempo.

[Eventos]: Participaré en el Empleatech 2026 en la serie de sesiones técnicas!

Este miércoles 4 de febrero tendré el honor de volver a participar en la edición 2026 de uno de los eventos de referencia de captación de talento de España: Empleatech 2026. En esta ocasión junto con Enrique Arribas estaré dando una sesión técnica (novedad de este año) sobre Vibe Coding en Power Platform aunque el trasfondo es el cambio de paradigma del desarrollador de software en el presente que tiene que construir software orientado a la especificación sin importar si hablamos de NowCode, Low Code o ProCode. Agradecer a Paco Racionero y a la organización de Empleatech el contar conmigo para las sesiones técnicas del evento.

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

Power Apps PDF Function: Create, View & Download PDFs

The new Power Apps PDF Function can generate a PDF document from any screen or control. It makes the task of creating PDFs very simple and only requires a standard license. Once the PDF is generated we can then view a PDF and download a PDF from directly inside of the app itself. In this article I will show you how to use the Power Apps PDF Function.

Table of Contents
• Introduction: The Work Orders AppSetup The SharePoint ListInsert A Vertical ContainerAdd A Power Apps Form To The Vertical ContainerEnable The Power Apps PDF Function Experimental FeatureGenerate A PDF Of The Power Apps FormView The PDF In Power AppsCreate A SharePoint Document Library To Store PDF FilesBuild A Flow To Download PDF Files From A SharePoint Document LibraryDownload The PDF Directly From Power Apps




Introduction: The Work Orders App

The work orders app is used by employees at a plumbing services company to track job details. An employee can view a PDF of the Work Order form on their device and download a copy of the PDF.




Setup The SharePoint List

Create a new SharePoint list named Work Orders with the following columns:

  • Map (image)
  • Address (single line text)
  • LastName (single line text)
  • AppointmentStart (date only)
  • IssueReported (single line text)
  • MaterialsRequired (single line text)



Add a new row to the SharePoint list with this data. We will display it on the Work Order PDF.

ColumnValue
Map
Address67 River Road
LastNameJones
AppointmentDate3/28/2021
IssueReportedWater is dripping from the upstairs bathroom into the basement. Homeowner believes it is coming from the bathtub. Only happens when the tub is turned on.
MaterialsRequired5 – PVC Pipes
1 – Tube Of Sealent
10 – Screws




Insert A Vertical Container

A PDF cannot be generated for a Power Apps Edit Form so we must use a workaround. We can place an Edit Form inside of a container and create a PDF of container’s contents instead. Open Power Apps Studio and create a new app from blank. Insert a vertical container onto the screen.



Make the vertical container fill the screen by giving the following properties these values.

Height: App.Height
Width: App.Width
X: 0
Y: 0



Set the LayoutAlignItems property to this value to make them fill the width of the container.

LayoutAlignItems.Stretch



Add a label to the container to use as a title bar. Give it the text “Work Order” and apply a dark blue fill.




Add A Power Apps Form To The Vertical Container

Next we will create a Power Apps Edit Form to display Work Order information. Open the Data tab from the left navigation menu and add the Work Orders SharePoint list as a data source.



Insert a Power Apps Edit form into the vertical container. Select the Work Orders SharePoint list as the data source.



Update the Edit Form to use a vertical layout with only 1 column.



Use this code in the Item property of the form to display the first record in the SharePoint list. In this tutorial the user will not have an ability to select another record.

LookUp('Work Orders', ID=1)



Change the DisplayMode property of the the Edit Form to View.

DisplayMode.View




Enable The Power Apps PDF Function Experimental Feature

The Power Apps PDF Function is an experimental feature and is not enabled by default. To use it, go to the Settings menu, select upcoming features, then toggle on the PDF Function setting.




Generate A PDF Of The Power Apps Form

When the user clicks on a PDF icon it generates the PDF and navigates to a screen with PDF viewer. Add a PDF icon to the app’s titlebar.



Then write this code in the icon’s OnSelect property.

The first argument to the Power Apps PDF Function tells it which screen or control to generate a PDF from. The second argument can be used to pass in optional values to control the PDF’s size, orientation, margins & DPI. Here we will use the ExpandContainers parameter to ensure the container expands to show any hidden or off-screen controls.

Set(
    varWorkOrderPDF,
    PDF(
        con_WorkOrder,
        {ExpandContainers: true}
    )
);
Navigate('PDF Viewer Screen');




View The PDF In Power Apps

We need to make another screen to display the PDF. Create a new screen named PDF Viewer Screen. Add a dark blue label for a titlebar and insert a left arrow icon in the top-left corner.



Use this code in the OnSelect property of the left arrow icon to navigate back to the previous screen.

Set(varWorkOrderPDF,Blank());
Navigate('Work Order Screen');


Add the PDF Viewer control the screen. Position the PDF Viewer control so it fills the remaining space on the screen.



Use this code in the document property of the PDF. The PDF document will now display in the PDF viewer.

varWorkOrderPDF



Test the feature we built to generate and view a PDF from Power Apps. It should look like this.





Create A SharePoint Document Library To Store PDF Files

We want to create the ability to download the PDF file directly from Power Apps. To do this, we need a place to temporarily store the PDF file. Make a new SharePoint Document library named Exported PDFs. No additional setup is required beyond creating the document library.




Build A Flow To Download PDF Files From A SharePoint Document Library

To download the PDF file we must make a flow to store the PDF file in SharePoint and then return a file download link to the app. Open Power Automate, create a new flow named Download PDF From Power Apps and setup the flow as show in the image below.



Use this code in the File Name property of the SharePoint – Create File action.

triggerBody()['file']['name']



A link to the PDF file in SharePoint opens it in the SharePoint document viewer. However, we want to perform a direct download of the PDF file instead. We can use this special URL to bypass the SharePoint document viewer and download the file. Fill in any tags <> with your own values.

https://<tenantname>.sharepoint.com/sites/<site collection title>/_layouts/15/download.aspx?SourceUrl=/sites/<site collection title>/<file path with the library name>



My completed URL looks like this.

https://matthewdevaney.sharepoint.com/sites/MatthewDevaneyBlog/_layouts/15/download.aspx?SourceUrl=/sites/MatthewDevaneyBlog/Exported PDFs/WorkOrder_20230423081046.pdf




Download The PDF Directly From Power Apps

Now that the Power Automate flow is completed go back to Power Apps Studio and add the Download PDF From Power Apps flow to the app.



Insert a save button icon in the top left corner of the PDF Viewer Screen.



Then add this code to the OnSelect property of the save icon. The Download function downloads a file from the internet to the user’s device. We get the file’s web address returned in the path property of the Download PDF From Power Apps flow.

Download(
    DownloadPDFFromPowerApps.Run(
        {
            name: $"WorkOrder_{Text(
                Now(),
                "yyyymmddhhmmss"
            )}.pdf",
            contentBytes: varWorkOrderPDF
        }
    ).path
);



Test the completed download PDF from Power Apps feature. It should work like this:


Did You Enjoy This Article? 😺

Subscribe to get new Power Apps articles sent to your inbox each week for FREE




Questions?

If you have any questions or feedback about Power Apps PDF Function: Create, View & Download PDFs please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion.

The post Power Apps PDF Function: Create, View & Download PDFs appeared first on Matthew Devaney.

How to create multiple tabs form in Power Apps

Are you struggling to create a tabbed form in Power Apps? Check out this complete step-by-step tutorial on how to create multiple tabs form in power apps

Recently, we got a requirement to build a tabbed form within the Power Apps while working with the Power Apps’ customized SharePoint form.

That means we will create an app within the Power Apps having multiple tabs such as Personal Details, Education, and Projects. When the user clicks on the ‘Personal Details’ tab, the respective form with fields will be visible. Similarly, when the ‘Education’ tab is clicked, the respective fields will be displayed as shown below:

Power Apps Tabbed Form
Power Apps Tabbed Form

Create multiple tabs form in power apps

Here, we will see how to create a Power Apps tabbed form. To work with the above scenario, follow the below step-by-step guide:

  • We have a SharePoint list named ESP Job Portal having columns such as:
Column NameType
Full NameSingle line of Text
EmailSingle line of Text
MobileNumber
DOBDate
GenderChoice
AddressMultiple lines of text
Highest QualificationChoice
Course NameChoice
UniversityChoice
Passing YearChoice
Academic ProjectSingle line of Text
Project TypeChoice
Project GroupChoice
SkillsSingle line of Text
Power Apps tabbed form
SharePoint List
  • Let’s integrate the above SharePoint list into Power Apps to create a customized form. For this, on the SharePoint list, click on Integrate > Power Apps > Customize forms.
Build Power Apps tabbed form from SharePoint
Build Power Apps tabbed form from SharePoint
  • It will redirect to the Power Apps by creating customized forms as shown below:
Build a tabbed form in Power Apps
Build power apps tabbed form 
  • Add a rectangle to the above custom form and add a text label control to the rectangle. Also, give a name to the label control (Ex: ESP Job Portal).
Create a tabbed form in Power Apps
Create a tabbed form in Power Apps
  • Add a blank horizontal gallery to the above screen and place it on the rectangle.
  • Insert the below expression on the horizontal gallery’s Items property to create a table.
Items = Table({ID:1, label:"Personal Details"}, {ID:2, label:"Education"}, {ID:3, label:"Project"})

Where, we have created 3 tabbed such as Personal Details, Education, and Project whose IDs’ are 1,2, and 3 respectively.

Create a tabbed form in PowerApps
Create a tabbed form in PowerApps
  • Add a button control to the horizontal gallery. Set the Text property as below to display the labels.
Text = ThisItem.label
Create a tabbed form in Power Apps using SharePoint list
Create a tabbed form in Power Apps using the SharePoint list
  • Next, we will create a variable using the table’s ID. Using that variable and ID, we will arrange the tabbed form. To create the variable, insert the below expression on the button’s OnSelect property.
OnSelect = Set(VarTabClicked, ThisItem.ID)

Where VarTabClicked is the name of the global variable and ThisItem.ID is the value of the variable.

Power Apps create tabbed form
Power Apps create tabbed form
  • Now, select each data card and use the variable to insert the following expression on the Visible property and set an ID.
  • For example, if we set the Visible property of the Title data card to ‘VarTabClicked = 1‘, the card will only appear when the Personal Details tab is clicked. Similarly, if we set ‘VarTabClicked = 2′, the data card will only appear when the Education tab is clicked.
  • As per the requirement, the client wants to display the Title (Full Name), Email, Mobile, DOB, Gender, Address, and Attachments in the first tab i.e., Personal Details. For this, insert the below expression on each data card’s Visible property as below:
Title's Visible: VarTabClicked =1
Email's Visible: VarTabClicked =1
Mobile's Visible: VarTabClicked =1
DOB's Visible: VarTabClicked =1
Gender's Visible: VarTabClicked =1
Address's Visible: VarTabClicked =1
Attachment's Visible: VarTabClicked =1

Below, we are displaying a screenshot where we have set the DOB data card’s Visible property as VarTabClicked =1.

Create a tabbed form in Power Apps using SharePoint Online
Create a tabbed form in Power Apps using SharePoint Online
  • Similarly, set the visible property of the Highest Qualification, Course Name, University, and Passing year’s Data card with the below expression.
Highest Qualification's Visible: VarTabClicked =2
Course Name's Visible: VarTabClicked =2
University's Visible: VarTabClicked =2
Passing year's Visible: VarTabClicked =2

As per the above expression, the above-mentioned data card will only appear when the Education tab is clicked.

create multiple tabs in powerapps
Build a tabbed form in Power Apps using the SharePoint list
  • Again, insert the below expression on the Visible property of the rest data cards (i.e., Academic Project, Project Type, Project Group, and Skills).
Academic Project's Visible: VarTabClicked=3
Project Type's Visible: VarTabClicked=3
Project Group's Visible: VarTabClicked=3
Skills's Visible: VarTabClicked=3

As per the above expressions, the above-mentioned data cards will appear only when the Project tab is clicked.

create multiple tabs form in power apps
Power Apps create a tabbed form

That’s it! We can see when the user clicks on any tab, the respective data cards will appear as shown below:

How to create a Power Apps tabbed form
How to create a Power Apps tabbed form
  • Finally, we will add a Save icon to the above form and insert the below expression on the icon’s OnSelect Property. As a result, when the user clicks on the icon the inserted data will be saved to the specified SharePoint list.
OnSelect = SubmitForm(SharePointForm1)

Where SharePointForm1 is the name of the SharePoint customized form.

How to build a Power Apps tabbed form
How to build a Power Apps tabbed form
  • On the SharePoint list, let’s rename the Title column as Full Name and refresh the data source on the Power Apps. We can see that the Title name is renamed to Full Name as shown below:
Power Apps tabbed form from SharePoint
Power Apps tabbed form from SharePoint

Now preview the app and click on each tab to insert the respective data with values. Press the Save icon.

Power Apps build a tabbed form
Power Apps build a tabbed form

This is how to build a tabbed form within the Power Apps.

Along with this, as we have created this tabbed form by integrating the SharePoint list, we can see this tabbed form within the SharePoint list while creating a new item.

Using SharePoint list create a Power Apps tabbed form
Using SharePoint list create a Power Apps tabbed form

This is how to display a Power Apps customized form within the SharePoint list.

Power Apps tabbed form using canvas app

In the above section, we have seen how to create a tabbed form from the SharePoint customize form within Power Apps. Now, we will see how to create a Power Apps tabbed form using the Canvas app.

For this, we are going to use the above SharePoint list and the following steps are:

  • On the Power Apps, create a blank canvas app and give a name to the canvas app. (Ex: Power Apps canvas app tabbed form)
  • Connect the above SharePoint list(‘ESP Job Portal‘) to the canvas app.
  • On the blank Power Apps screen, add a rectangle and add a text label control. Give a text to the label control i.e., ‘ESP Job Portal’.
Tabbed form in Power Apps
Tabbed form in Power Apps
  • Add a blank horizontal gallery to the screen and place the gallery under the header of the form.
  • Insert the below expression on the horizontal gallery’s Items property to create the items.
Items = ["Personal Details", "Education Details", "Project Details"]

Where Personal Details, Education Details, and Project Details are the name of the tabs that we are going to use.

Create a tabbed form in PowerApps canvas app
Create a tabbed form in PowerApps canvas app
  • Add a Power Apps button control into the horizontal gallery and insert the below expression on the button’s Text property.
Text = ThisItem.Value
Power Apps canvas app tabbed form
Power Apps canvas app tabbed form
  • To check whether the button(tab) is clicked or not, insert the below expression on the respective properties of the button control.
Fill = If(ThisItem.IsSelected,Color.LightBlue,RGBA(0,0,0,0))
HoverFill = Color.LightBlue
RadiusTopLeft = 25
RadiusTopRight = 25

As a result, now the button control will look like as below:

Power Apps canvas app build tabbed form
Power Apps canvas app build tabbed form
  • Using the button’s text, let’s create a global variable on the button’s OnSelect property. Later we will use the variable for each data card that will appear when the respective tab is clicked.
OnSelect = Set(VarTabClicked, Self.Text)

Where VarTabClicked is the name of the global variable and Self.Text indicates the respective button’s name that has been clicked.

Tabbed form in Power Apps canvas app
Tabbed form in Power Apps canvas app
  • Now, we will add an edit form to the above Power Apps screen. Connect that edit form to the Sharepoint list and add all the fields to the form.
How to build a tabbed form in Power Apps canvas app
How to build a tabbed form in Power Apps canvas app
  • As per the requirement, when the user clicks on the Personal Details tab, then the respective certain fields will appear. Such as Full Name, Email, Mobile, DOB, Gender, Address, and Attachments.
  • For this, select each above-mentioned data card and insert the below expression on the Visible property.
Full Name's Visible: VarTabClicked = "Personal Details"
Email's Visible: VarTabClicked = "Personal Details"
Mobile's Visible: VarTabClicked = "Personal Details"
DOB's Visible: VarTabClicked = "Personal Details"
Gender's Visible: VarTabClicked = "Personal Details"
Address's Visible: VarTabClicked = "Personal Details"
Attachment's Visible: VarTabClicked = "Personal Details"

Now, we can see all the above-mentioned fields will be visible only when the Personal Details tab is clicked.

Create a Power Apps tabbed form on Canvas app
Create a Power Apps tabbed form on Canvas app
  • Similarly, let’s set the below expression on certain fields’ Visible properties that should appear when the Education Details tab is clicked such as Highest Qualification, Course Name, University, Starting Year, Passing Year, and Mark Secured in Percentage.
Highest Qualification's Visible: VarTabClicked = "Education Details"
Course Name's Visible: VarTabClicked = "Education Details"
University's Visible: VarTabClicked = "Education Details"
Starting Year's Visible: VarTabClicked = "Education Details"
Passing Year's Visible: VarTabClicked = "Education Details"
Mark Secured in Percentage's Visible: VarTabClicked = "Education Details"
Canvas app tabbed form in Power Apps
Canvas app tabbed form in Power Apps
  • Again set the rest data cards’ visible properties as the below expression. As a result, when the Project Details will click, the respective fields will appear. Such as Academic Project, Project Summary, Project Type, Project Group, Skills, and Your role in Project.
Academic Project's Visible: VarTabClicked = "Project Details"
Project Summary's Visible: VarTabClicked = "Project Details"
Project Type's Visible: VarTabClicked = "Project Details"
Project Group's Visible: VarTabClicked = "Project Details"
Skills's Visible: VarTabClicked = "Project Details"
Your role in Project's Visible: VarTabClicked = "Project Details"
Power Apps canvas app create tabbed form
Power Apps canvas app create tabbed form

Now, for a better look, we’ll change the Edit form’s Column property to 1 and DefaultMode to New.

That’s it! Let’s save and publish the app for now. Play the app in preview mode and we can see that when we click on a certain tab the respective fields will appear as shown below:

PowerApps canvas app tabbed form
PowerApps canvas app tabbed form
  • Now, we will add two button controls to the above-tabbed form and rename the buttons as Save and Cancel respectively.
  • Insert the below expression on the Save button’s OnSelect property to save the inserted data to the SharePoint list.
OnSelect = SubmitForm(Form1)

Where Form1 is the name of the Power Apps edit form.

  • Similarly, insert the below expression on the Cancel button’s OnSelect property to cancel or reset the form.
OnSelect = ResetForm(Form1)
Tabbed form in PowerApps canvas app
Tabbed form in PowerApps canvas app

Let’s fill in the fields and click on the Save button. We can see the inserted data will save into the SharePoint list.

Power Apps canvas app tabbed form using SharePoint list
Power Apps canvas app tabbed form using SharePoint list

This is how to build a tabbed form within the Power Apps canvas app using a SharePoint list.

Power Apps tabbed form with required fields

In this section, we will see Power Apps tabbed form with the required fields.

Suppose, there are certain required or mandatory fields available in the above SharePoint list.

Power Apps tabbed form with mandatory fields
Power Apps tabbed form with mandatory fields

Let’s refresh the SharePoint data source list on the above-mentioned Power Apps canvas app tabbed form. Once the data source is refreshed, we can see the required fields (data cards) will appear with the small asterisks symbol.

Power Apps tabbed form with required fields
Power Apps tabbed form with required fields

Also, we can see on the above screen, by default a required message is appearing under the required fields.

In Power Apps, it doesn’t allow saving the inserted data without filling in these fields. We also, observe that the required message automatically disappears once the field is filled as shown below:

PowerApps tabbed form with required fields
PowerApps tabbed form with required fields

Once mandatory fields will fill, we can able to save the data to the data source. This is how to work with Power Apps tabbed form with the required fields.

Conclusion

From this Power Apps Tutorial, we learned how to build a create multiple tabs form in power apps from a SharePoint list based on different scenarios. Such as:

  • Build a tabbed form within Power Apps
  • Power Apps tabbed form using canvas app
  • Power Apps tabbed form with required fields

You may also like the following Power Apps tutorials:

Power Automate Dataverse Upload a File or an Image

Do you know how to upload a file or an image in a Dataverse row using Power Automate? No worries! In this Dataverse tutorial, we will see how to work with Power Automate Dataverse Upload a File or an Image.

In a recent assignment, I had to use Power Automate to upload a file to a certain Dataverse row. And we’ll put it into practice through this tutorial to see how it functions.

Also, Read: Power Automate Dataverse Add New Row

Power Automate Dataverse Upload a File or an Image

Here, we will take one scenario and explore how to upload a file or an image into a Dataverse row using Power Automate.

Example:

  • There is a Dataverse table called IT Issue Resolutions. This table has the fields below with different data types. Such as:
  1. Sender = This is the Dataverse Primary column with a single line of text data type.
  2. Issues = Single line of text data type
  3. Report Date = Date Data type
  4. Status = Choice Column having some choices like Approved, Rejected, Pending, etc.
  5. Attachments = This is a File column. To know more details about the Dataverse file column, read: How to Create Dataverse File Field
Power Automate Dataverse Upload a File or an Image
Power Automate Dataverse Upload a File or an Image
  • I want to create a flow right now where the sender sends an email with an attachment (file). The relevant file will attach in the specific dataverse row if the sender email contains the given Dataverse sender name.
  • For instance, if Sonam sends an email with an attachment (Sonam@tsinfotechnologies.onmicrosoft.com), then the sender’s name will be filtered.
  • If the email address is the same as the Dataverse sender name, then the specific file will upload in Sonam’s attachment field as shown below if the requirement is met.

Refer to the screenshot below.

Dataverse Upload a File or an Image Power Automate
Dataverse Upload a File or an Image Power Automate

To achieve this above requirement, follow the steps below.

Step – 1: [Create a new automated flow]

  • Open Power Automate and Sign in with your valid Microsoft credentials.
  • Go to My flows (from the left navigation) -> Expand + New flow -> Select Automated cloud flow under the Build your own from blank section.
Dataverse Upload a File Power Automate
Dataverse Upload a File Power Automate

Step – 2: [Provide Flow name and Choose the trigger]

  • The window shown below will then display, asking you to enter the flow name and select the flow trigger.
    • Flow name = I have given the flow name as Extract Names from Email.
    • Choose your flow’s trigger = Search or select the trigger from the list below to create a flow. In my case, it’s When a new email arrives (V3).
  • Click on Create.
How to upload a file or an image in Dataverse using Power Automate
How to upload a file or an image in Dataverse using Power Automate

Step – 3: [Select Include Attachments]

  • Once the flow has been created, the trigger will appear as shown in the screenshot below. Expand the trigger and select Yes under the Include Attachments field.
Upload a file or an image in Dataverse using Flow
Upload a file or an image in Dataverse using Flow

Step – 4: [Add Get Attachment]

  • Click on the icon and Add an action to insert a new step below the trigger (When a new email arrives (V3)).
  • Search Get attachment in the search bar -> Select Office 365 Outlook -> Click on Get Attachment (V2) under the Actions tab.
Upload a file or an image in Dataverse using Power Automate
Upload a file or an image in Dataverse using Power Automate
  • Expand the Get Attachment action and enter the below field values as:
    • Message Id = Select the field and click on the Message Id under When a new email arrives (V3) from the Dynamic content. When you will select the Message Id, then the Apply to each action and its value (Attachments) will add automatically.
Upload a file in Dataverse using Power Automate
Upload a file in Dataverse using Power Automate
  • The below screenshot represents the Attachment Id.
    • Attachment Id = Select the field and click on the Attachments Attachment Id under When a new email arrives (V3) from the Dynamic content.
Upload a file in Dataverse Power Automate
Upload a file in Dataverse Power Automate

Step – 5: [Insert List rows action]

  • Then, under the Get Attachment (V2) action, click on the + icon and add a Microsoft Dataverse List rows [PREMIUM] action.
Power Automate Upload a file in Dataverse
Power Automate Upload a file in Dataverse
  • Once the List rows action has been added, just select the Dataverse Table name (IT Issue Resolutions) from the dropdown menu.
  • In the Filter rows field, apply the code below:
contains(crf9a_sender, 'From')

Where,

  1. crf9a_sender is the logical name of the Sender (Dataverse column).
  2. From, you can take this under the When a new email arrives (V3) action from the Dynamic content.
Upload file in Dataverse using Power Automate
Upload file in Dataverse using Power Automate

Check out: Microsoft Flow Error “Could not find a property named ‘crf9a_Sender’ on type ‘Microsoft.Dynamics.CRM.crf9a_itissueresolutions’”

Step – 6: [Upload a file or an image action]

  • To upload a file of the specific sender, Click on the + icon and add an action called Upload a file or an image [PREMIUM] action under Microsoft Dataverse.
Power Automate Upload file in Dataverse table
Power Automate Upload file in Dataverse table
  • Expand the action and fill in the field details below:
    • Table name = Provide the Dataverse table name (IT Issue Resolutions) from the dropdown menu.
    • Row ID = Select the field and click on the IT Issue Resolutions under the List rows action [from Dynamic content].
    • Column name = Select the Dataverse File column name (Attachments) from the dropdown.
Power Automate upload a file or image in Dataverse
Power Automate upload a file or image in Dataverse
  • Also, the below fields are there:
    • Content = Select the field and click on the Content Bytes under the Get Attachment (V2) action [from Dynamic content].
    • Content name = Select the field and click on the Attachments Name under the Get Attachment (V2) action [from Dynamic content].

Refer to the screenshot below.

Power Automate Dataverse upload a file
Power Automate Dataverse upload a file

Step – 7: [Save and Test the flow]

  • Finally, Save the flow. Click the flow checker as well to see if there are any problems.
  • If so, fix it. If not, move on to testing the flow. Select Test.
Power Automate Dataverse upload an image
Power Automate Dataverse upload an image
  • Select Manually and click Test as shown below in the Test Flow pane. You must send a new email to your inbox to check whether the flow is functional or not.
  • For this, I used Sonam, a different account, to send a message (with an attachment) to my inbox, as shown in the screenshot below.
Dataverse upload a file using Power Automate
Dataverse upload a file using Power Automate

Step – 8: [Flow ran successfully]

  • At the top of the flow, a statement such as “Your flow ran successfully” will appear when the flow eventually completes successfully.
Upload a file in Datavesre using Power Automate
Upload a file in Datavesre using Power Automate

Step – 9: [Refresh the Dataverse table]

  • Return to the relevant Dataverse table (IT Issue Resolutions) at this point and perform a single refresh. The image below shows the email attachment that has been added to Sonam’s Attachments space.
How to Upload a file in Datavesre using Power Automate
How to Upload a file in Datavesre using Power Automate

Step – 10: [Save the File]

  • If you want to save the Dataverse file in your local system, then select the record and click on the Edit row using Form from the top bar.
  • In the Dataverse form, click on the file link -> Choose a location to save the Dataverse file -> Click on Save as shown below.
How to upload file in Dataverse using flow
How to upload file in Dataverse using flow

This is how to Upload a File or an Image in Dataverse using Power Automate.

Furthermore, you may like some more Dataverse and Power Apps tutorials:

In this Dataverse tutorial, we discussed how to work with Power Automate Dataverse Upload a File or an Image.

How to Get Value from Text input in Power Apps

In this Power Apps Tutorial, we will see how to get value from text input in Power Apps.

Recently, we were asked by one of our clients to get value from text input. That means when the user inserts any data within the text input control and clicks on a button control, the item will be getting by a data source (Whether it is a collection or SharePoint list). Follow this tutorial, to get the solution.

Along with this, we will cover the below topics based on the Power Apps text input control. Such as:

  • Get value from Power Apps text input using a filter function
  • Get value from Power Apps text input using the search()
  • Get password value from Power Apps text input

Also, Read: How to Get Gallery Item By ID in Power Apps

Get Value from Text input in Power Apps

In this section, we will see how to get the value from a single text input control to a data source.

Here, we are going to use a collection that will display the value that we got from the text input control. To work with these scenarios, the following steps are:

  • On the Power Apps screen, we have created a collection ‘CollName’ on the screen visible property.
OnVisible = ClearCollect(
    ColName,
    {UserName: "Johney"},
    {UserName: "Marly"}
)

Where ColName is the name of the collection and UserName is the name of the collection header.

  • Add a gallery to the screen and connect it with the collection to show the collected data. For this, set the collection name (ColName) on the gallery’s Items property.
Power Apps get value from Text Input control
Power Apps get value from the Text Input control
  • Next, add a text input control to the above Power Apps screen and give a name to the text input control i.e., UserName_txtInput.
  • Add a button control to the Power Apps screen and insert the below expression on the button’s OnSelect property.
OnSelect = Patch(
    ColName,
    Defaults(ColName),
    {UserName: UserName_txtInput.Text}
);
Reset(UserName_txtInput)

As per the above expression, when the user clicks the button the item will store in the collection.

Power Apps get item from text control
Power Apps get item from text control

That’s it! We can see that when we insert any item in the text control and click on the button, the collection (that is connected to the gallery) will get that value from the text input. After that, the text input control will be reset to blank.

Get item from the Power Apps text input control
Get item from the Power Apps text input control

This is how to get an item from the Power Apps text input control.

Check out: Power Apps Set ThisItem Value [With Real Examples]

Get value from Power Apps text input using filter

In this section, we will see how to get value from Power Apps text input using the filter function. That means when the user inserts any text in the text input control the item will be within a gallery and will be filtered as per the inserted text value.

To achieve this requirement, the following steps are:

  • We have a SharePoint list named Products List having different types of columns such as single line of text, date column, choice column, image, etc.
  • On the Power Apps screen, we have created a horizontal gallery using the above SharePoint list as shown below:
Power Apps get value from Text Input using filter
Power Apps get value from Text Input using filter
  • On the above screen, add a Power Apps text input control to insert the product’s company and give a name to the text input control.
  • Insert the below expression on the horizontal gallery’s Items property.
Items = Filter(
    'Products List',
    Company.Value = Company_txt.Text
)

Where Company_txt is the name of the Power Apps text input control. As the company is a choice column, it is denoted as Company.Value.

Get value from Power Apps text input using filter
Get value from Power Apps text input using filter
  • Let’s preview the app and insert a specific company name from the list. We can see the galley will display only the data whose value match to the text input value.
Get value from PowerApps text input using filter
Get value from PowerApps text input using filter

This is how to get value from Power Apps text input control using a filter function.

Have a look: How to Select First Item in a Power Apps Gallery

Get value from Power Apps text input using the search()

In this section, we will see how to get the items from the Power Apps text input control using the search function.

That means, when the user inserts any text input control, it will search the items that contain that given text and display those items within a Power Apps gallery.

To work with this scenario, we are going to use the above Power Apps gallery and the following steps are:

  • On the Power Apps screen, insert the below expression on the horizontal gallery’s Items property.
Items = Search(
    'Products List',
    Products_txt.Text,
    "Title"
)

Where Products_txt is the name of the Power Apps text input control and “Title” is the name of the SharePoint list column name.

Power Apps get item from text control by search function
Power Apps get items from text control by the search function

Let’s preview the app and insert a text within the text input control. Now, we can see that the gallery will display only those items whose title contains the specified text from the text input control.

Get value from Power Apps text input using the search function
Get value from Power Apps text input using the search function

This is how to get the value from a Power Apps text input control using the search function.

Get password value from Power Apps text input

In this section, we will see how to get password value from a Power Apps text input control. That means, when the user inserts their password via Power Apps text control, it will retrieve that password value from the text input control and collect them on a collection.

To work with this scenario, the following steps are:

  • On the Power Apps screen, add two text input controls for inserting the user’s ID and password.
Get password value from Power Apps text input control
Get password value from Power Apps text input control
  • On the second text input control, set the Mode as Password.
Get Password value from the Power Apps text input control
Get Password value from the Power Apps text input control
  • Add a button control to the above Power Apps screen that will store the data in a secondary storage or collection. Also, give a text to the button control i.e., Save.
  • Next, insert the below expression on the button’s OnSelect property.
OnSelect = Collect(
    ColUser,
    {
        UserID: UserID_txtInput.Text,
        Password: Password_txtInput.Text
    }
)

Where,

  • ColUser is the name of the collection to store the users’ names and passwords.
  • UserID_txtInput and Password_txtInput are the names of the text input controls for the user’s name and password respectively.
How to get password value from Power Apps text input control
How to get password value from Power Apps text input control
  • Let’s add a data table control to the above Power Apps screen and connect that data table to the ColUser.
  • Add the fields (i.e., User ID and Password) to the data table.
  • Save, publish, and preview the app for now. Insert a user ID, and password into the text input control and press the button control.
  • We can see that the data table is showing the user ID and password as shown below:
power apps text input control get password value
power apps text input control gets password value

This is how to get the password value from the Power Apps text input control.

Furthermore, you may like some more Power Apps tutorials:

Conclusion

From the above Power Apps Tutorial, we learned how to get value from the Power Apps text input control based on different scenarios such as:

  • Power Apps get value from text input
  • How to get value from a Power Apps text input using a filter function
  • How to get value from the Power Apps text input using the search()
  • How to get a password value from Power Apps text input

How to Get Gallery Item By ID in Power Apps

This Power Apps Tutorial will teach us how to work with how to get gallery item by ID in Power Apps.

While working with the Power Apps canvas app, we got a requirement to get the gallery item by their respective ID.

Here, we will see how to get an item by their ID within the Power Apps gallery.

Also, Read: Power Apps Set ThisItem Value [With Real Examples]

Power Apps Get Gallery Item By ID

This section will show how to get an item via id within the Power Apps gallery. That means the Power Apps gallery will display only those items whose ID matches the given ID.

To work with the scenario, the following steps are:

  • We have prepared a gallery by using a certain SharePoint list named Content Scheduler list that displays the items’ ID, title, draft date, publish date, type, etc. as shown below:
Power Apps get gallery item by id
Power Apps get gallery item by id
  • From the above Power Apps gallery, we want to display only that item whose ID is equal to 5. To get the gallery item, insert the below expression on the above gallery’s Items property.
Items = Filter('Content Scheduler', ID = 5)

Where ‘Content Scheduler’ is the name of the SharePoint data source, and ID is the name of the SharePoint list column.

Power Apps get a gallery item by ID
Power Apps get a gallery item by ID

This is how to get a gallery item by ID within Power Apps.

Check out: Power Apps Gallery Patch [With Various Examples]

Power Apps get gallery items via id using Or condition

In this section, we’ll look at how to retrieve gallery items by ID using the OR condition. That means, from the above Power Apps gallery retrieve the items whose IDs are equal to 7 or 3.

To get the gallery items, the following steps are:

  • On the above Power Apps gallery, insert the below expression on the Items property of the gallery.
Items = Filter(
    'Content Scheduler',
    ID = 7 Or ID = 3
)

Once the formula is applied, we can see the Power Apps gallery will display only those items whose ID matches to 3 or 7.

Power Apps get a gallery item by ID using OR condition
Power Apps get a gallery item by ID using OR condition

This is how to get a gallery item by ID using OR condition within the Power Apps.

Read: Power Apps Checkbox control within Gallery

Power Apps get gallery item via id based on dropdown

In this section, we will see how to get gallery items via ID based on a dropdown control within the Power Apps. That means when the user selects any ID from the dropdown control the respective item will be displayed on the Power Apps gallery.

To work with this scenario, we are going to use the above Power Apps gallery and the following steps are:

  • On the above Power Apps screen, add a dropdown control and place it beside the gallery.
  • Click on Insert > Input > Dropdown > Select.
  • Insert the below expression on the Power Apps dropdown control’s Items property to display all the item’s ID.
Items = 'Content Scheduler'.ID
Power Apps get a gallery item by ID based on dropdown control
Power Apps get a gallery item by ID based on dropdown control
  • To get the gallery item based on the dropdown control inside the Power Apps, insert the below expression on the gallery’s Items property.
Items = Filter(
    'Content Scheduler',
    ID = ItemID_dd.Selected.ID
)

Where ItemID_dd is the name of the Power Apps dropdown control.

Power Apps gallery get item by ID based on Dropdown
Power Apps gallery get item by ID based on Dropdown

Let’s preview the app and select any ID from the dropdown control. We can see the respective item will be displayed in the Power Apps gallery.

Get gallery item by ID using Power Apps dropdown
Get gallery item by ID using Power Apps dropdown

This is how to get the gallery item by ID using a Power Apps dropdown control.

Additionally, you may like some more Power Apps Tutorials:

Conclusion

From this Power Apps Tutorial, we learned how to get the gallery item by ID based on different scenarios such as:

  • Get gallery an item by ID in Power Apps
  • Power Apps get gallery items via id using Or condition
  • Power Apps get gallery item via id based on dropdown

Make A Power Apps Timesheet App – Part 2

This is the 2nd article in a series about how to build your own timesheets app in Power Apps. The first article focused on creating a timesheet lines feature with the ability to add, edit, delete and save lines. This article will continue the tutorial to include the ability to create new timesheets and submit them for approval.

If you haven’t completed Make A Power Apps Timesheet App Part 1 then I would highly encourage you to check it out first.

Table of Contents
• Setup The Timesheets SharePoint ListAdd A LookUp Columns To The Timesheet Lines SharePoint ListDesign The Sidebar MenuCreate A New TimesheetSave The New Timesheet To The SharePoint ListSubmit The Completed TimesheetUpdate The Save Button CodeLock The Text Input Fields When Timesheet Is SubmittedDelete An Existing TimesheetDisplay The Current User's Timesheets In The SidebarSelect A Timesheet From The SidebarTimesheets App Completed




Setup The Timesheets SharePoint List

Create a new SharePoint list with the following columns:

  • Employee (Person)
  • StartDate (Date)
  • EndDate (Date)
  • TotalHours (Number)
  • Status (Choice) [New, Submitted, Accepted, Rejected]


The SharePoint list will look like this once it becomes populated with data.




Add A LookUp Column To The Timesheet Lines SharePoint List

Each timesheet will have one or more associated timesheet lines. Therefore, we must create a relationship between the Timesheet List and the Timesheet Lines. Go to the Timesheet Lines SharePoint list and add a new column named TimesheetID.




Design The Sidebar Menu

Add a new label to the SidebarContainer with the text “Timesheets.” Give it the same styling as the “Timesheet” label in the HeaderContainer but make the Color property White.



Insert a horizontal container named NewTimesheetContainer into the SidebarContainer.



Place an Add Document icon and a label with the text “New Timesheet” inside the NewTimesheetContainer.



Write this code in the OnSelect property of the icon to set the current timesheet value to blank and clear the deleted time sheet lines collection.

Set(gblTimesheetCurrent, Blank());
Clear(colDeleteTimesheetLines);




Create A New Timesheet

When a user presses the New Timesheet icon a form will appear and ask the user to select the new timesheet’s week. Insert the following 4 controls into the MainSectionContainer.

  • Label – with the text “Select Timesheet Week”
  • DatePicker
  • Label – empty
  • Button – with the text “Next”



The highlighted areas will conditionally shows based upon whether the variable gblTimesheetCurrent is blank or is not blank.



Set the Visible property of all controls highlighted in green to this code…

IsBlank(gblTimesheetCurrent)



…and set the Visible property of all controls highlighted in orange to this code.

!IsBlank(gblTimesheetCurrent)



Update the timesheet title label to show the text “Create A New Timesheet” when the variable gblTimesheetCurrent is blank.



Use this code in the Text property of the title label. When the variable gblTimesheetCurrent is not blank display the selected timesheet’s

If(
    IsBlank(gblTimesheetCurrent),
    "Create A New Timesheet",
    $"Timesheet: {Text(
        gblTimesheetCurrent.StartDate,
        "mmmm d"
    )} - {Text(
        gblTimesheetCurrent.EndDate,
        "mmmm d, yyyy"
    )}"
)




Save The New Timesheet To The SharePoint List

Once the user clicks the next button the timesheet is saved to SharePoint and they can begin to enter their time worked.



Write this code in the OnSelect property of the button. The Employee field is populated with a person type value. StartDate and EndDate are set to the Sunday and Saturday of the selected week. Status is New and TotalHours are 0.

// create a new timesheet and store the result
Set(
    gblTimesheetCurrent,
    Patch(
        Timesheets,
        Defaults(Timesheets),
        {

            // set timesheet employee to current user
            Employee: {
                '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                Claims: $"i:0#.f|membership|{User().Email}",
                Department: "",
                DisplayName: User().FullName,
                Email: User().Email,
                JobTitle: "",
                Picture: ""
            },


            // set start date to Sunday of the selected week
            StartDate: DateAdd(dte_TimesheetWeek.SelectedDate,1-Weekday(dte_TimesheetWeek.SelectedDate,StartOfWeek.Sunday),TimeUnit.Days),

            // set end date to Saturday of the selected week
            EndDate: DateAdd(dte_TimesheetWeek.SelectedDate,1-Weekday(dte_TimesheetWeek.SelectedDate,StartOfWeek.Sunday)+6,TimeUnit.Days),

            Status: {Value: "New"},
            TotalHours: 0
        }
    )
);
// create the first timesheet line
ClearCollect(
    colTimesheetLines,
    Patch(
        'Timesheet Lines',
        Defaults('Timesheet Lines'),
        {TimesheetID: gblTimesheetCurrent.ID}
    )
);
// reset date picker to blank
Reset(dte_TimesheetWeek)



After the Next button is pressed the RightContainer updates to look like this.




Update The New Timesheet Line Code

We must update the new line icon code to apply the Timesheet ID.



Replace any code in the OnSelect property of the new line icon with this code.

Patch(
    colTimesheetLines,
    Defaults('Timesheet Lines'),
    {TimesheetID: gblTimesheetCurrent.ID}
)



Submit The Completed Timesheet

The save button writes timesheet data back to the SharePoint list but it does not update the timesheet status to “Submitted”. To do this, insert a new Send icon into the ActionsContainer and label with the text “Submit.”



Write this code in the OnSelect property of the Submit icon. The final line of code uses the the Select function to run the code found in the OnSelect property of the Save icon. We will update that code next.

// update the timesheet status to submitted
Set(
    gblTimesheetCurrent,
    Patch(
        Timesheets,
        gblTimesheetCurrent,
        {Status: {Value: "Submitted"}}
    )
);
// save the timesheet lines
Select(ico_Save);




Update The Save Button Code

The Save button must now perform one additional action to update the timesheet’s total hours.



Add the new code below to the OnSelect property of the Save icon.

// collection to update timesheet lines
ClearCollect(
    colUpdateTimesheetLines,
    ForAll(
        gal_TimesheetLines.AllItems,
        'Timesheet Lines'@{
            ID: ID,
            TimesheetID: TimesheetID // <----- NEW CODE
            PayCode: drp_PayCode.Selected.Value,
            Sunday: Value(txt_Sunday.Text),
            Monday: Value(txt_Monday.Text),
            Tuesday: Value(txt_Tuesday.Text),
            Wednesday: Value(txt_Wednesday.Text),
            Thursday: Value(txt_Thursday.Text),
            Friday: Value(txt_Friday.Text),
            Saturday: Value(txt_Saturday.Text)
        }
    )
);

// update timesheet lines and store the results
ClearCollect(
    colTimesheetLines,
    Patch(
        'Timesheet Lines',
        gal_TimesheetLines.AllItems,
        colUpdateTimesheetLines
    )
);


// delete timesheet lines
ForAll(
    colDeleteTimesheetLines,
    Remove(
        'Timesheet Lines',
        ThisRecord
    )
);
Clear(colDeleteTimesheetLines);

// ***NEW CODE***

// update total hours on timesheet record
Set(
    gblTimesheetCurrent,
    Patch(
        Timesheets,
        gblTimesheetCurrent,
        {
            TotalHours: Sum(
                colUpdateTimesheetLines,
                Sunday
            ) + Sum(
                colUpdateTimesheetLines,
                Monday
            ) + Sum(
                colUpdateTimesheetLines,
                Tuesday
            ) + Sum(
                colUpdateTimesheetLines,
                Wednesday
            ) + Sum(
                colUpdateTimesheetLines,
                Thursday
            ) + Sum(
                colUpdateTimesheetLines,
                Friday
            ) + Sum(
                colUpdateTimesheetLines,
                Saturday
            )
        }
    )
);




Lock The Text Input Fields When Timesheet Is Submitted

The user must not be able to change the timesheet lines once the timesheet is submitted.



Use this code in the DisplayMode property of the timesheet lines pay code dropdown menu and all of the text input fields.

If(
    gblTimesheetCurrent.Status.Value="New",
    DisplayMode.Edit,
    DisplayMode.Disabled
)



Hide the ability to delete timesheet lines by setting the Visible property of the Trash icon to this code.

gblTimesheetCurrent.Status.Value="New"



A submitted timesheet should look like this.




Delete An Existing Timesheet

We must add one more ability to the ActionsContainer to delete a timesheet. Insert a Trash icon and a label with the word “Delete” into the container.



Write this code in the OnSelect property of the Trash icon.

ForAll(
    gal_TimesheetLines.AllItems,
    Remove(
        'Timesheet Lines',
        {ID: ThisRecord.ID}
    )    
);
Clear(colDeleteTimesheetLines);
Remove(
    Timesheets,
    gblTimesheetCurrent
);
Set(
    gblTimesheetCurrent,
    Blank()
)




Display The Current User’s Timesheets In The Sidebar

New timesheets will appear in the sidebar menu as they are created. The user can change to a different timesheet by clicking on it. Add a blank vertical gallery to the SidebarContainer.



Set the Flexible Height property of the gallery to true.



Use this code in the Items property of the gallery to show only the current user’s timesheets.

Sort(
    Filter(
        Timesheets,
        Employee.Email = User().Email
    ),
    StartDate,
    SortOrder.Descending
)



Insert two labels into the gallery to display the timesheet start & end date and status,



Use this code in the Text property of the date range label.

$"{Text(
    ThisItem.StartDate,
    "mmm d"
)} - {Text(
    ThisItem.EndDate,
    "mmm d"
)}"



Write this code in the Text property of the status label.

ThisItem.Value.Status




Select A Timesheet From The Sidebar

When a user selects a timesheet from the sidebar it should appear in the RightContainer. Add a button to the gallery and make it fill the entire gallery row. Remove any text found in the button.



Use this code in the OnSelect property of the button to select the current timesheet and load its timesheet lines.

Set(
    gblTimesheetCurrent,
    ThisItem
);
ClearCollect(
    colTimesheetLines,
    Filter(
        'Timesheet Lines',
        TimesheetID = gblTimesheetCurrent.ID
    )
);
Clear(colDeleteTimesheetLines)



Make the button Fill property transparent when the timesheet is not selected and show a slightly transparent white color when the timesheet is selected.

If(
    ThisItem.ID=gblTimesheetCurrent.ID,
    RGBA(255, 255, 255, 0.15),
    Color.Transparent
)



Also update the HoverFill and PressedFill properties to this code.

RGBA(255, 255, 255, 0.15)




Timesheets App Completed

The timesheets app is now completed. Add any additional features that are required then deploy it to the organization.


Did You Enjoy This Article? 😺

Subscribe to get new Power Apps articles sent to your inbox each week for FREE




Questions?

If you have any questions or feedback about Make A Power Apps Timesheet App – Part 2 please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion.

The post Make A Power Apps Timesheet App – Part 2 appeared first on Matthew Devaney.

Power Apps Set ThisItem Value [With Real Examples]

In this Power Apps Tutorial, We will learn how to set a ‘ThisItem‘ operator within the Power Apps. Also, We will discuss how to work with the ThisItem operator within the Power Apps gallery based on different scenarios.

Currently, We got a requirement from one of our clients while working with a certain canvas app. As per their requirement, they want to set a variable value using the ThisItem operator.

Also, Read: How to Select First Item in a Power Apps Gallery

What is Power Apps ThisItem?

In Power Apps, ThisItem is a formula that refers to the currently selected item in a gallery or form control. When a user interacts with a gallery or form control, Power Apps automatically sets the context of ‘ThisItem‘ to the item that was selected.

The Power Apps ThisItem refers to the properties of the currently selected item, such as its ID or name, in formulas and expressions throughout your app. That is, it represents the current data structure for each section of the record within the respective gallery.

Working with the Power Apps ThisItem

Here, we will see how to work with the Power Apps ThisItem operator within a gallery control. For this, the following steps are:

  • On the Power Apps screen, add a blank vertical gallery.
  • Add a text control to the Power Apps gallery. We can see as the gallery didn’t connect with any data source, it will display a sample text within the text control with the below expression.
Text = ThisItem.SampleText
Power Apps ThisItem
Power Apps ThisItem
  • Let’s add a button control to the gallery and create a global variable to store the SampleText of each section of the record.
  • For this, add a button control to the above Power Apps gallery and insert the below expression on the button’s OnSelect property.
OnSelect = Set(VarValue, ThisItem.SampleText)
Set ThisItem in Power Apps
Set ThisItem in Power Apps
  • Again, we will add a text input control on the outside of the Power Apps gallery. Insert the below expression on the Text property.
Text = VarValue

Where VarValue is the name of the global variable that we have created. Now, we can see when we click any button the respective item will be displayed on the text input control.

Power Apps set ThisItem value
Power Apps set ThisItem value

This is how to work with the ThisItem value in Power Apps.

Check out: How to get selected value from gallery in Power Apps?

Set ThisItem value in the Power Apps gallery

Here, we will see how to set a value using the ThisItem operator within a Power Apps gallery. For this, we have a SharePoint list based on ‘Content Scheduler’ having different types of columns such as single line of a text column, choice column, and date as shown below:

Power Apps set ThisItem value in a gallery
Power Apps set ThisItem value in a gallery

On the Power Apps screen, let’s add a blank vertical gallery and connect the gallery with the above SharePoint list.

How to set ThisItem value in Power Apps gallery
How to set ThisItem value in a Power Apps gallery
  • Add a text label control to the above Power Apps gallery and insert the below expression on the Text property to display the content’s title.
Text = ThisItem.Title

Once we insert the above formula it retrieves all the data from the title column of the specified SharePoint list.

PowerApps set ThisItem value in a gallery
PowerApps set ThisItem value in a gallery
  • Similarly, we can add another text label control to display the date column data. For that, the expression will be as below:
text = ThisItem.'Draft Date'
Set ThisItem in Power Apps gallery
Set ThisItem in Power Apps a gallery
  • In the case of the choice column, the expression will be a little different. For this, add a text label control to the Power Apps gallery and insert the below expression on the Text property to display the blog status value.
Text = ThisItem.'Blog Status'.Value
How to set ThisItem value in a Power Apps gallery
How to set ThisItem value in a Power Apps gallery

Similarly, we have added 2 more text label control to add publish date and blog type as shown below:

PowerApps set ThisItem value in gallery
PowerApps set ThisItem value in a gallery

This is how to set the ThisItem value in a Power Apps gallery.

Have a look: How to add text input to Power Apps collection?

Update ThisItem value in Power Apps gallery

In this section, we will discuss how to update a value in Power Apps gallery using the ThisItem property. That is, we will add an icon to the above Power Apps gallery. When the user clicks on that icon, the respective item’s ‘publish date’ will be updated to a specific date value.

To work with this scenario, the following steps are:

  • Add an icon (calendar or right) to the above Power Apps gallery.
  • Insert the below expression on the icon’s OnSelect property.
OnSelect = Patch(
    'Content Scheduler',
    ThisItem,
    ContentScheduler_Gallery.Selected,
    {'Publish Date': Today()}
)

Where

  • ContentScheduler_Gallery is the name of the above Power Apps vertical gallery.
  • ‘Publish Date’ is the name of the date column where the date value will be updated.
  • Today() reveals the current date.
Power Apps update ThisItem value in a gallery
Power Apps update ThisItem value in a gallery

Let’s publish and preview the app. We can see when we click on any icon the respective date value will be updated within the above gallery.

Update ThisItem value in Power Apps gallery
Update ThisItem value in Power Apps gallery

This is how to update a particular item’s value by using the ThisItem in a Power Apps gallery.

Furthermore, you may like some more Power Apps tutorials:

Conclusion

From this Power Apps Tutorial, we learned all about Power Apps ThisItem property based on different scenarios. Such as:

  • What is Power Apps ThisItem?
  • How to work with the Power Apps ThisItem?
  • Set ThisItem value in the Power Apps gallery.
  • How to update the ThisItem value in a Power Apps gallery?

How to Select First Item in a Power Apps Gallery

In this Power Apps Tutorial, we’ll look at how to select first item in a Power Apps gallery.

We were recently asked to create a Power Apps gallery that would select the first item when working with the Power Apps canvas apps.

Along with this, we will discuss the below topics based on a select the first item within the Power Apps gallery control. Such as:

  • Power Apps get the first selected item in a gallery
  • Power Apps select the first item in a filtered gallery
  • Power Apps get the first item in a gallery collection

Power Apps select first item in a gallery

In this section, we’ll look at how to select the first item in a Power Apps gallery. That is, the gallery will be displayed by default by selecting the first item.

For this, we need to build a Power Apps gallery. We have a SharePoint list named Hotel Guest Registration that contains different types of columns such as single line of text, date, number, etc as shown below:

Power Apps select the first item in the gallery
Power Apps select the first item in the gallery
  • Using the above SharePoint list, we will create a canvas app within the Power Apps.
PowerApps select the first item in the gallery
PowerApps select the first item in the gallery

Note:

In the above Power Apps gallery, we have concatenated the guest’s first name and last name as well as the address and city by using the below expressions.
  • Now, insert the following expression into the Default property of the Power Apps vertical gallery. As a result, it selects the first item in the gallery by default.
Default = First(Self.AllItems)
Select default first item in Power Apps gallery
Select the default first item in a Power Apps gallery
  • To identify the selected item, insert the below expression on the gallery’s TemplateFill property.
TemplateFill = If(ThisItem.IsSelected, Color.BlanchedAlmond,Color.LightGray)
How to auto select first item in a Power Apps gallery
How to auto-select the first item in a Power Apps gallery

This is how to auto-select the first item in a Power Apps gallery.

Get first selected item in a Power Apps gallery

Here, we will see how to get the first selected item in a Power Apps gallery. For this, we are going to use the above example of the Power Apps gallery where the first item has been selected bydefault.

To get the first selected gallery item, the following steps are:

  • On the Power Apps screen, add a display form where we can display all the details from the Power Apps screen.
  • Insert the below expression on the Items property of the Power Apps display form.
Items = Hotel_Registration_Gallery.Selected

Where Hotel_Registration_Gallery is the name of the Power Apps vertical gallery.

Get selected first gallery item value in Power Apps
Get selected first gallery item value in Power Apps

We can see that the Power Apps display form will show all of the details from the first gallery item that was selected.

Power Apps get the first selected item in a gallery
Power Apps get the first selected item in a gallery

This is how to get the first selected item in a Power Apps gallery.

Also, read How to create multiple tabs form in Power Apps

Power Apps select the first item in a filtered gallery

In this section, we’ll look at how to choose the first item from a filtered Power Apps gallery. That is, we will create a filter gallery based on a specific condition and then identify the first item from the filtered values.

To work with this scenario, we are going to use the above Power Apps gallery and the following steps are:

  • Suppose, we are going to filter the data whose ‘check-in’ date is on 16/3/2023. For this, we will insert the below expression on the gallery’s Items property.
Items = Filter('Hotel Guest Registration','Check-in Date'=Date(2023,3,16))

Where ‘Hotel Guest Registration’ is the name of the SharePoint data source, and ‘Check-in Date’ is the name of the SharePoint list date column based on which we will filter the gallery data.

How to get first selected item from the Power Apps filtered gallery
How to get a first selected item from the Power Apps filtered gallery
  • To get the first selected item from the above Power Apps gallery, update the gallery’s Items property with the below expression:
Items = First(
    Filter(
        'Hotel Guest Registration',
        'Check-in Date' = Date(
            2023,
            3,
            16
        )
    )
)

Also, insert the below expression on the gallery’s TemplateFill property to identify the selected first item.

TemplateFill = If(ThisItem.IsSelected, Color.DarkSalmon,Color.LightGray)
Power Apps get a first selected item in the filtered gallery
Power Apps get a first selected item in the filtered gallery

This is how to get the first selected item in the Power Apps filtered gallery.

Power Apps get the first item in a gallery collection

We’ll look at how to get the first item in a Power Apps gallery collection in this section. As per the requirement, we will display the collection through a gallery and select the first item from it.

We made a collection based on a button control. That is, when the user clicks the button, a collection is created. For this, we have used the below expression on a Power Apps button control’s OnSelect property.

OnSelect = Collect(ColGadgets,
{Gadget:"Airpods Gen 2" , Year: 2022, Manufacturer: "Apple"},
{Gadget:"Meta Quest Pro" , Year: 2023 , Manufacturer: "Meta"},
{Gadget:"Google Pixel 7" , Year: 2022 , Manufacturer: "Google"},
{Gadget:"Watch Ultra" , Year:2023 , Manufacturer: "Apple"},
{Gadget:"G4 electric bike" , Year:2021 , Manufacturer: "Gocycle"},
{Gadget:"Legion Pro 7i Powerful Laptop" , Year:2023 , Manufacturer: "Lenovo"}
);
power apps select first item in a gallery collection
power apps select first item in a gallery collection
  • Next, click on the button to create a collection and add a vertical gallery to the Power Apps screen. Connect the gallery with the collection. As a result, the gallery will display all the collected data.
Power Apps get first selected item in the gallery collection
Power Apps get first selected item in the gallery collection
  • Now, let’s add another gallery to get the first selected item from the above Power Apps gallery collection. For this, insert the below expression on the new gallery’s Items property.
Items = First(ColGadgets)

We can see, the new gallery will display the first selected item from the Power Apps gallery collection as shown below:

How to get first selected item in the PowerApps gallery collection
How to get the first selected item in the PowerApps gallery collection

This is how to get the first selected item in the PowerApps gallery collection.

Conclusion

From this Power Apps Tutorial, we learned all about getting the first selected gallery item within Power Apps based on different scenarios. Such as:

  • Power Apps select the first item in the gallery
  • Power Apps get the first selected item in a gallery
  • Power Apps select the first item in a filtered gallery
  • Power Apps get the first item in a gallery collection

You may like the following Power Apps gallery control articles:

How to get selected value from gallery in Power Apps?

In this Power Apps Tutorial, we will learn how to get selected values from a gallery in Power Apps.

Recently, we got a requirement to get the value from a Power Apps gallery selected item while working with the canvas app.

Also, we will discuss the below topics based on getting selected values from a Power Apps gallery. Such as:

  • Power Apps get a selected value from the gallery to an edit form
  • How to get a selected value from the gallery to a display form in Power Apps
  • Power Apps get the selected value from a gallery by Id
  • Power Apps get selected value from a gallery the last item

First, we’ll look at how to get the value of a Power Apps gallery item that has been selected.

Power Apps get a selected value from a gallery

We’ve created a Power Apps gallery that contains a couple of best-selling books and their authors.

Power Apps get selected items from the gallery
Power Apps get selected items from the gallery

As per the requirement, when a user selects an item from the Power Apps gallery, the selected value is gotten and displayed on the screen. To work with this scenario, the following steps are:

  • Add a text label control to the Power Apps screen and place the control next to the gallery.
  • Insert the below expression into the Text property of the Power Apps text control.
Text = "You have selected " & Books_gallery.Selected.Author & " - " & Books_gallery.Selected.BookName

Where Books_gallery is the name of the above gallery control.

Get selected item value from the Power Apps gallery
Get selected item value from the Power Apps gallery

By default, it is displaying the first selected item value on the Power Apps text label control. To identify the selected value from the Power Apps gallery, insert the below expression on the gallery’s TemplateFill property.

TemplateFill = If(ThisItem.IsSelected, Color.Cornsilk, Color.White)
Get selected item from the Power Apps gallery
Get the selected item from a Power Apps gallery

This is how to get the selected item from the Power Apps gallery.

Power Apps get a selected value from a gallery to an edit form

In this section, we’ll look at how to get a selected value from the Power Apps gallery to an edit form. That is when a user selects an item from the Power Apps gallery control, it will navigate to the edit form and allow the user to edit the selected item within the Power Apps edit form.

To work with this scenario, the following steps are:

  • There is a SharePoint list named Projects Management having different types of columns such as single line of text, date, choice, and currency.
get selected value from gallery in Power Apps
Power Apps get selected items from the gallery to form
  • Using the above SharePoint list, we have built a vertical gallery within the Power Apps.
  • To identify the selected item within the gallery, insert the below expression on the gallery’s TemplateFill property.
TemplateFill = If(ThisItem.IsSelected, Color.Orange, Color.White)
Power Apps get selected items from the gallery to edit form
Power Apps get selected items from the gallery to edit form
  • Add another screen to the Power Apps and add an edit form to the screen. Connect the edit form to the SharePoint list i.e., Project Management.
get selected value from Power Apps gallery
Get a selected item from the gallery to a Power Apps edit form
  • To get the selected item from the Power Apps gallery to an edit form, again insert the below expression on the gallery’s OnSelect property.
OnSelect = Set(
    varSelectedItem,
    ThisItem
);
Navigate('ProjectManagement Edit Form Screen')

Where ‘varSelectedItem’ is the variable name and ‘ProjectManagement Edit Form Screen’is the name of the Power Apps screen where the edit form is created.

get selected value from Power Apps gallery control
Get a selected item from the gallery to a PowerApps edit form

That’s all! Save the app and then open it in preview mode. When an item is selected in the Power Apps gallery, the details of that item are retrieved and displayed within the edit form.

Power Apps selected gallery item to edit form
Power Apps selected gallery item to edit form

This is how to get the selected item from a gallery to the PowerApps edit form.

Read How to Select First Item in a Power Apps Gallery

Power Apps get a selected value from a gallery to display form

Similarly, here we will see how to get a selected value from the Power Apps gallery to a display form. That means when the user clicks on an item from the Power Apps gallery, the selected items’ details will display on the Power Apps display form as shown below:

Power Apps get selected items from the gallery to display form
Power Apps get selected items from the gallery to display form

We will use the above Power Apps gallery (Project Management System) to get the selected gallery item details in the Power Apps display form; the steps are as follows:

  • On the above apps, add a display form to another new Power Apps screen.
  • Connect the display form to the SharePoint list data source.
Power Apps get a selected value from gallery to display form
Power Apps get a selected value from gallery to display form
  • Insert the below expression on the Power Apps gallery’s OnSelect form.
OnSelect = Set(
    varSelectedItem,
    ThisItem
);
Navigate(ProjectMangement_Display_Screen)

Where varSelectedItem is the name of the created global variable and ProjectMangement_Display_Screen is the name of the Power Apps screen where the display form is created.

PowerApps get a selected value from gallery to display form
PowerApps get a selected value from gallery to display form
  • Similarly, update the Items property of the Power Apps display form with the global variable.
Items = varSelectedItem
Get selected gallery items to Power Apps display form
Get selected gallery items to Power Apps display form

On the above screen, we can see that it is displaying all the details from the Power Apps gallery selected item.

This is how to get selected gallery items to Power Apps display form.

Power Apps get the selected value from a gallery by ID

In this section, we’ll look at how to get the value of a gallery item by ID. That is when a user selects an item from a Power Apps gallery, the item is displayed on the display form with all details as shown below:

Power Apps get the selected value from a gallery by ID
Power Apps get the selected value from a gallery by ID

To work with this scenario, the following steps are:

  • We have built a Power Apps vertical gallery using a certain SharePoint list that displays the product’s image, name, and order date.
PowerApps get the selected value from a gallery by ID
PowerApps get the selected value from a gallery by ID
  • To identify the selected item within the Power Apps gallery, insert the following expression on the gallery’s TemplateFill property.
TemplateFill = If(ThisItem.IsSelected, Color.DeepSkyBlue,Color.LightBlue)
Get the selected value from a Power Apps gallery by ID
Get the selected value from a Power Apps gallery by ID
  • Add a Power Apps display form to the above screen and connect that display form to the SharePoint list. (I.e., Products list)
How to get the selected value from a Power Apps gallery by ID
How to get the selected value from a Power Apps gallery by ID
  • To get the selected item details from the Power Apps gallery, insert the below expression on the gallery’s OnSelect property.
OnSelect = Set(
    VarItemID,
    ThisItem.ID
);
Navigate(Product_FormViewer)

Where Product_FormViewer is the name of the Power Apps display form.

Get selected gallery items using ID in Power Apps
Get selected gallery items using ID in Power Apps
  • Similarly, insert the below formula on the display form’s Item property.
Item = LookUp('Products List', ID= VarItemID)
How to get the selected value from a PowerApps gallery by ID
How to get the selected value from a PowerApps gallery by ID

That’s it! Let’s preview the app and select an item from the above Power Apps gallery. We can see that, the details of the selected item will be displayed on the Power Apps display screen.

Get a selected value from a Power Apps gallery by ID
Get selected value from a Power Apps gallery by ID

This is how to get the selected value from a Power Apps gallery by ID.

Power Apps get selected value from a gallery’s last item

In this section, we will see how to get the selected value from a gallery’s last item. That means the last item of the gallery will be automatically displayed on the Power Apps screen.

To implement this, we are going to use the above gallery and the following steps are:

  • On the above Power Apps screen, insert the below expression on the gallery’s Default property.
Default = Last(Self.AllItems)

Once the above formula is applied, we can see the last item of the gallery has been selected automatically.

Power Apps get selected value from a gallery's last item
Power Apps get selected value from a gallery’s last item
  • Add an Image control and place it beside the gallery control.
  • Insert the below expression on the Image control’s Image property.
Image = Product_Gallery.Selected.Image

Where Product_Gallery is the name of the Power Apps vertical gallery. The image control will now display the image of the gallery’s last selected item.

How to get selected value from gallery in Power Apps
Get selected value from a Power Apps gallery’s last item

This is how to get the selected value from a Power Apps gallery’s last item.

Conclusion

From this Power Apps Tutorial, we learned all about how to get a selected item value from Power Apps gallery based on different scenarios such as:

  • Power Apps get a selected value from the gallery
  • Power Apps get a selected value from the gallery to an edit form
  • Power Apps get a selected value from the gallery to a display form
  • Power Apps get the selected value from a gallery by ID
  • Power Apps get selected value from a gallery’s last item

You may also like the following Power Apps tutorials:

Microsoft Flow Error “Could not find a property named ‘crf9a_Sender’ on type ‘Microsoft.Dynamics.CRM.crf9a_itissueresolutions'”

In this Power Automate tutorial, We will discuss an error i.e. Could not find a property named ‘crf9a_Sender’ on type ‘Microsoft.Dynamics.CRM.crf9a_itissueresolutions’ while working with Datavesre and as well as its solution.

When I was working with Dataverse recently, I needed to use Power Automate to upload a file or an image into a Dataverse row.

For this, I have used a Dataverse List Rows action to filter the rows, and the below error occurred “Could not find a property named ‘crf9a_Sender’ on type ‘Microsoft.Dynamics.CRM.crf9a_itissueresolutions’“.

Refer to the screenshot below that how the error displays in the flow:

Could not find a property named 'crf9a_Sender' on type 'Microsoft.Dynamics.CRM.crf9a_itissueresolutions
Could not find a property named ‘crf9a_Sender’ on type ‘Microsoft.Dynamics.CRM.crf9a_itissueresolutions

We’ll now go into more depth about this issue and how to fix it.

Also, Read: Invalid Connection. Please Choose a Connection Power Automate

Could not find a property named ‘crf9a_Sender’ on type ‘Microsoft.Dynamics.CRM.crf9a_itissueresolutions’ – Error

  • I have a Dataverse table named IT Issue Resolutions. In this table, I have various columns like Issues, Report Date, Attachments, etc with different data types. Along with them, there is a Dataverse Primary column named Sender.
  • Also, this Dataverse table has some records as shown in the screenshot below:
Could not find a property named crf9a Sender Power Automate
Could not find a property named ‘crf9a_Sender’ Power Automate
  • Now, I would like to upload a file or an image into a specific Dataverse row using Power Automate.
  • In order to do this, I filtered the rows using a Dataverse List rows action, and if the value matches, then the particular file or image will upload in that particular dataverse row.
  • In the Dataverse List rows action, there is a field called Filter rows. And I filtered the Sender name i.e.
contains(crf9a_Sender, 'From')
  • This means if the sender’s name contains any value from the When a new email arrives (V3) (From), then the flow will proceed and execute.
  • While I used the above code in the Filter rows field, I got an error like “Could not find a property named ‘crf9a_Sender’ on type ‘Microsoft.Dynamics.CRM.crf9a_itissueresolutions’“.

NOTE:

Even if you will try the code like contains(Sender, ‘From’), then also you will get the same error like “Could not find a property named ‘Sender’ on type ‘Microsoft.Dynamics.CRM.crf9a_itissueresolutions’“.
Power Automate could not find a property named 'crf9a_Sender' on type 'Microsoft.Dynamics.CRM.crf9a_itissueresolutions'
Power Automate could not find a property named ‘crf9a_Sender’ on type ‘Microsoft.Dynamics.CRM.crf9a_itissueresolutions’
  • The error clearly states that the fields like it cannot able to recognize the property or column name i.e. ‘crf9a_Sender’ from the Dataverse table (IT Issue Resolutions).

Now we’ll look at how to resolve the abovementioned Power Automate problem in the part that follows.

Check out: The JSON function cannot serialize tables / objects with a nested property called ‘_ownerid_value’ of type ‘Polymorphic’ Power Apps

Could not find a property named ‘crf9a_Sender’ on type ‘Microsoft.Dynamics.CRM.crf9a_itissueresolutions’ – Solution

When I ran across this Power Automate issue, I did some research online and browsed a number of websites. Here, I integrated it into the code which eventually resolved my problem and carried on as necessary. Follow the instructions below:

  • Go to the Dataverse table (IT Issue Resolutions) -> Expand Sender column -> Click on Edit column -> Expand Advanced options -> Copy the Logical name i.e. crf9a_sender as shown in the image below.
Power Automate Could not find a property named 'crf9a_Sender'
Power Automate Could not find a property named ‘crf9a_Sender’
  • Now go back to the existing flow, expand the List rows action, and paste that Sender logical name (crf9a_sender) inside the contains function that looks like below:
contains(crf9a_sender, 'From')

Refer to the image below.

Could not find a property named 'crf9a_Sender' flow
Could not find a property named ‘crf9a_Sender’ flow
  • Once the flow is ready, just save and test the flow. Now you can see the flow will execute without giving any error.
How to fix could not find a property named 'crf9a_Sender' in Power Automate
How to fix could not find a property named ‘crf9a_Sender’ in Power Automate

This is how we can resolve the Power Automate issue i.e. “Could not find a property named ‘crf9a_Sender’ on type ‘Microsoft.Dynamics.CRM.crf9a_itissueresolutions’” while working with Dataverse table.

Furthermore, you may like some more Power Automate and Dataverse tutorials:

In this Power Automate tutorial, We discussed an error i.e. Could not find a property named ‘crf9a_Sender’ on type ‘Microsoft.Dynamics.CRM.crf9a_itissueresolutions’ while working with Datavesre and its solution.

How to add text input to Power Apps collection?

In this Power Apps Tutorial, we will learn how to add text input to a Power Apps collection.

Recently, we got a requirement to add text from the text input control to a Power Apps collection while working with the Canvas app. Also, we will discuss the below topics based on Power Apps text control:

  • How to add multiple text inputs to a collection in PowerApps
  • Add text input to an existing collection in Power Apps
  • Update text input to a collection on change in Power Apps

Add text input to a Power Apps collection

Here, we will discuss adding data from a Power Apps text input control to a new Power Apps collection. That means when the user dynamically inserts any data in the text input control, it will add them to the Power Apps collection via a button click.

To work with this scenario, the following steps are:

  • On the Power Apps screen, add a Text Input control and button control.
  • Give a name to the button control ex: Save to Collection.
  • Insert the below expression on the button’s OnSelect property.
OnSelect = Collect(
    CollProject,
    {ProjectName: ProjectName_txt.Text}
)

ProjectName_txt is the name of the Power Apps text input and CollProject is the name of the new collection we created.

Power Apps add text input control to Collection
Power Apps add text input control to the Collection
  • To display the collection add a vertical gallery to the Power Apps screen and connect it with the collection (i.e., CollProject).
Power Apps add text input control to Collection on button click
Power Apps add text input control to Collection on button click
  • For the time being, let’s save and publish the app. Insert any data on the Power Apps text input control in preview mode, and we can see that when we click on the button control, the text is added to the Power Apps collection, as shown below:
Add text Input control to the Power Apps collection
Add text Input control to the Power Apps collection

This is how to add text Input control to a Power Apps collection.

Add multiple text inputs to a collection in Power Apps

In this section, we will see how to add multiple text inputs to a Power Apps collection at once. That means when the user clicks on the button, it will add the data from the multiple text input controls to the Power Apps collection.

Consider the following scenario: the user enters the employee’s name, email address, and current project name into the appropriate text input controls, and then clicks the button to save the data in the collection.

To achieve this requirement, the following steps are:

  • On the Power Apps screen, add 3 text input controls for inserting the employee’s name, email address, and current project name.
  • Add a button control to the screen and give a name to the button control.
  • Insert the below expression on the button’s OnSelect property.
OnSelect = Collect(
    Coll_Project,
    {
        FullName: EmployeeName_txt.Text,
        Email: Email_txt. Text,
        Project: ProjectName_txt.Text
    }
)

Where,

  • Coll_Project is the name of the collection.
  • EmployeeName_txt, Email_txt, and ProjectName_txt are the name of the Power Apps text input controls.
Power Apps add multiple text inputs to the collection
Power Apps add multiple text inputs to the collection
  • Let’s add a Power Apps vertical gallery control to the screen and connect it with the collection to display the collected data.
PowerApps add multiple text inputs to collection
PowerApps add multiple text inputs to collection

Let’s preview the app and insert the data into the text input controls. We can see the collected data on the Power Apps gallery while clicking the button.

Add multiple text inputs to the Power Apps collection
Add multiple text inputs to the Power Apps collection

This is how to add multiple text inputs to a Power Apps collection.

Add text input to an existing collection in Power Apps

In this section, we will see how to add data from text input control to an existing Power Apps collection.

That means when the user inserts any data into the text input control, the data will be collected and stored in an existing collection. To work with this scenario, the following steps are:

  • We have created a collection on the Power Apps screen’s OnVisible property.
OnVisible = ClearCollect(CollGadget, {GadgetName:"Meta Quest Pro", Manufacturer:"Meta"}, {GadgetName:"Google Pixel 7", Manufacturer:"Google"},{GadgetName:"Airpods Gen 2", Manufacturer:"Apple"}, {GadgetName:"Gocycle G4 electric bike", Manufacturer:"GoCycle"}, {GadgetName:"Legion Pro 7i Powerful Laptop", Manufacturer:"Lenovo"})

Where,

  1. CollGadget is the name of the Power Apps collection.
  2. GadgetName and Manufacturer are the names of the collection headers.
Power Apps add text input control to existing Collection
Power Apps add text input control to existing Collection
  • Let’s add two text control to the Power Apps screen to insert the gadget name and manufacturer.
  • Also, add a button control to the screen to store the data on the collection via the button click. Insert the below expression on the button’s OnSelect property.
OnSelect = Patch(
    CollGadget,
    Defaults(CollGadget),
    {
        GadgetName: GadgetName_txt.Text,
        Manufacturer: Manufacturer_txt.Text
    }
)

Where,

  1. CollGadget is the name of the existing Power Apps collection.
  2. GadgetName_txt and Manufacturer_txt are the names of the text input control.
Power Apps add text input to the existing collection
Power Apps add text input to the existing collection
  • Add a gallery control (or data table) and connect that with the existing collection i.e., CollGadget.
Power Apps add text input control to an existing Collection
Power Apps add text input control to an existing Collection

Let’s insert data on the above text input control and click on the button. We can see the inserted items got added to the existing collection as shown below:

Add text input to the existing Power Apps collection
Add text input to the existing Power Apps collection

This is how to add text input to an existing Power Apps collection.

Power Apps update text input to the collection on change

In this section, we will see how to update the data from a text input control into the Power Apps collection. That means when the user selects any collection item via a gallery, the respective data will display on the text input control. When the user inserts any data, the inserted data will be updated on the Power Apps collection.

To work with this scenario, we are going to use the above Power Apps gallery that is connected with the CollGadget and the following steps are:

  • Add a text input control to the Power Apps screen and place it beside the above gallery.
  • Insert the below expression on the text input’s Default property to display the selected item’s manufacturer.
Default = ColGadget_Gal.Selected.Manufacturer

Where ColGadget_Gal is the name of the Power Apps gallery and Manufacturer is the name of the collection column.

Update text input to Power Apps collection
Update text input to Power Apps collection
  • To update the selected item’s Manufacturer, insert the below expression on the text input’s OnChange property.
OnChange = Patch(
    CollGadget,
    LookUp(
        CollGadget,
        Manufacturer = ColGadget_Gal.Selected.Manufacturer
    ),
    {Manufacturer: Manufacturer_txt.Text}
)
Power Apps update text input to the collection on change
Power Apps update text input to the collection on change
  • To identify the selected items from the gallery, we will insert the below expression on the Color properties of the right navigation icon.
Color = If(ThisItem.IsSelected, Color.IndianRed, Color.Blue)
PowerApps update text input to the collection on change
PowerApps update text input to the collection on change

Let’s preview the app and select an item from the gallery. Also, update the manufacturer name and we can see the modification will be visible on the collection via gallery.

Update PowerApps text input to the collection on change
Update PowerApps text input to the collection on change

This is how to update PowerApps text input to the collection on change.

Conclusion

From this Power Apps tutorial, we learned how to work with Power Apps collection using text input control based on different scenarios. Such as:

  • Power Apps add text input to the collection
  • Add multiple text inputs to a collection in Power Apps
  • Add text input to an existing collection in Power Apps
  • Power Apps update text input to the collection on change

You may also like:

❌
❌