{"id":7278,"date":"2024-12-26T14:09:08","date_gmt":"2024-12-26T14:09:08","guid":{"rendered":"https:\/\/softreetechnology.com\/blog\/?p=7278"},"modified":"2024-12-26T14:09:09","modified_gmt":"2024-12-26T14:09:09","slug":"how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate","status":"publish","type":"post","link":"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/","title":{"rendered":"How To Fetch Items From SharePoint List To PowerApps Gallery, Calculate"},"content":{"rendered":"\n<p>In this article, I\u2019m going to demonstrate how SharePoint List Records are fetched to the PowerApps Gallery Control and, in the gallery we&#8217;ll be calculating some values as per the requirement, then those calculated values will be updated again to the List.<\/p>\n\n\n\n<p><strong>STEP 1 &#8211; Creating a List<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>List Name: Calculation<\/li><li>ItemName: (Single Line Text)<\/li><li>Quantity: (Number)<\/li><li>UnitPrice:(Number)<\/li><li>Total:(Number)<\/li><\/ul>\n\n\n\n<p>Create the List as per the above specifications.<\/p>\n\n\n\n<p>Enter some dummy values to the ItemName, Quantity, UnitPrice Columns.<\/p>\n\n\n\n<p><strong>STEP 2 &#8211; Working with PowerApps gallery<\/strong><\/p>\n\n\n\n<p>Go to PowerApps and create a blank canvas app and name it as per the Project Title.<\/p>\n\n\n\n<p>Add a blank vertical Gallery to the Screen and you can rename it as per your need.<\/p>\n\n\n\n<p>Add the Data Source from the SharePoint List to The Gallery Items.<\/p>\n\n\n\n<p>Select the Gallery control and choose the pencil icon to edit the required fields with context to List Data Source.<\/p>\n\n\n\n<p>Put some Controls and change their properties as follows,<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Put a Label Control- Set Text Property-ThisItem.ItemName<\/li><li>Put a Label Control- Set Text Property-ThisItem.Quantity<\/li><li>Put a Label Control- Set Text property-ThisItem.UnitPrice<\/li><li>Put a Text Input Control- Set Default Property:<strong>ThisItem.Quantity*ThisItem.UnitPrice<\/strong><\/li><\/ul>\n\n\n\n<p><strong>STEP 3 &#8211; Function To Update List Items<\/strong><\/p>\n\n\n\n<p>Add a Button Control to the Screen and rename it as you need.<\/p>\n\n\n\n<p>Write the&nbsp; following functions on button On Select Property,<\/p>\n\n\n\n<p>ForAll(RenameColumns(Gallery1.AllItems, &#8220;ID&#8221;, &#8220;CID&#8221;), Patch(Calculation, LookUp(Calculation, ID = CID), {<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;ItemName: lblName.Text,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;Quantity: Value(lblQty.Text),<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;UnitPrice: Value(lblUP.Text),<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;Total: Value(txtTotal.Text)<\/p>\n\n\n\n<p>}));<\/p>\n\n\n\n<p><strong>STEP 4 &#8211; Save &amp; Run the Application<\/strong><\/p>\n\n\n\n<p>Save the Application and run it. The Application runs successfully and will update all the Calculated items from the Gallery to the SharePoint List you are working with.<\/p>\n\n\n\n<p><strong>STEP 5 &#8211; Checking The List Data Source<\/strong><\/p>\n\n\n\n<p>Go to Your Share Point List and refresh it. You will see that all the Total columns are updated.<\/p>\n\n\n\n<p><strong>Conclusion<\/strong><\/p>\n\n\n\n<p>In the above article we successfully did the calculation and updating of calculated Values to the SharePoint List as per the requirements.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, I\u2019m going to demonstrate how SharePoint List Records are fetched to the PowerApps Gallery Control and, in the gallery we&#8217;ll be calculating some values as per the requirement, then those calculated values will be updated again to the List. STEP 1 &#8211; Creating a List List Name: Calculation ItemName: (Single Line Text) Quantity: (Number) UnitPrice:(Number) Total:(Number) Create [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7279,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[221],"tags":[208,323,56,383],"class_list":["post-7278","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-pnp-powershell","tag-powerapps","tag-sharepoint","tag-sharepoint-list"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Fetch Items From SharePoint List To PowerApps Gallery, Calculate - Softree Technology<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Fetch Items From SharePoint List To PowerApps Gallery, Calculate - Softree Technology\" \/>\n<meta property=\"og:description\" content=\"In this article, I\u2019m going to demonstrate how SharePoint List Records are fetched to the PowerApps Gallery Control and, in the gallery we&#8217;ll be calculating some values as per the requirement, then those calculated values will be updated again to the List. STEP 1 &#8211; Creating a List List Name: Calculation ItemName: (Single Line Text) Quantity: (Number) UnitPrice:(Number) Total:(Number) Create [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/\" \/>\n<meta property=\"og:site_name\" content=\"Softree Technology\" \/>\n<meta property=\"article:published_time\" content=\"2024-12-26T14:09:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-26T14:09:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2024\/12\/How-To-Fetch-Items-From-SharePoint-List-To-PowerApps-Gallery-Calculate-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1080\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Fetch Items From SharePoint List To PowerApps Gallery, Calculate - Softree Technology","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/","og_locale":"en_US","og_type":"article","og_title":"How To Fetch Items From SharePoint List To PowerApps Gallery, Calculate - Softree Technology","og_description":"In this article, I\u2019m going to demonstrate how SharePoint List Records are fetched to the PowerApps Gallery Control and, in the gallery we&#8217;ll be calculating some values as per the requirement, then those calculated values will be updated again to the List. STEP 1 &#8211; Creating a List List Name: Calculation ItemName: (Single Line Text) Quantity: (Number) UnitPrice:(Number) Total:(Number) Create [&hellip;]","og_url":"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/","og_site_name":"Softree Technology","article_published_time":"2024-12-26T14:09:08+00:00","article_modified_time":"2024-12-26T14:09:09+00:00","og_image":[{"width":1080,"height":1080,"url":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2024\/12\/How-To-Fetch-Items-From-SharePoint-List-To-PowerApps-Gallery-Calculate-1.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/#article","isPartOf":{"@id":"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/"},"author":{"name":"admin","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/98740297642f06debccdcee2de84086b"},"headline":"How To Fetch Items From SharePoint List To PowerApps Gallery, Calculate","datePublished":"2024-12-26T14:09:08+00:00","dateModified":"2024-12-26T14:09:09+00:00","mainEntityOfPage":{"@id":"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/"},"wordCount":364,"commentCount":0,"publisher":{"@id":"https:\/\/softreetechnology.com\/blog\/#organization"},"image":{"@id":"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/#primaryimage"},"thumbnailUrl":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2024\/12\/How-To-Fetch-Items-From-SharePoint-List-To-PowerApps-Gallery-Calculate-1.png","keywords":["PnP PowerShell","PowerApps","SharePoint","SharePoint List"],"articleSection":["PowerShell"],"inLanguage":"en","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/","url":"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/","name":"How To Fetch Items From SharePoint List To PowerApps Gallery, Calculate - Softree Technology","isPartOf":{"@id":"https:\/\/softreetechnology.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/#primaryimage"},"image":{"@id":"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/#primaryimage"},"thumbnailUrl":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2024\/12\/How-To-Fetch-Items-From-SharePoint-List-To-PowerApps-Gallery-Calculate-1.png","datePublished":"2024-12-26T14:09:08+00:00","dateModified":"2024-12-26T14:09:09+00:00","breadcrumb":{"@id":"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/#primaryimage","url":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2024\/12\/How-To-Fetch-Items-From-SharePoint-List-To-PowerApps-Gallery-Calculate-1.png","contentUrl":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2024\/12\/How-To-Fetch-Items-From-SharePoint-List-To-PowerApps-Gallery-Calculate-1.png","width":1080,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/softreetechnology.com\/blog\/powershell\/how-to-fetch-items-from-sharepoint-list-to-powerapps-gallery-calculate\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/softreetechnology.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Fetch Items From SharePoint List To PowerApps Gallery, Calculate"}]},{"@type":"WebSite","@id":"https:\/\/softreetechnology.com\/blog\/#website","url":"https:\/\/softreetechnology.com\/blog\/","name":"Softree Technology","description":"Celebrating 10+ Years in SharePoint Consulting !","publisher":{"@id":"https:\/\/softreetechnology.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/softreetechnology.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/softreetechnology.com\/blog\/#organization","name":"Softree Technology","url":"https:\/\/softreetechnology.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2023\/03\/cropped-white-logo-soft.png","contentUrl":"https:\/\/softreetechnology.com\/blog\/wp-content\/uploads\/2023\/03\/cropped-white-logo-soft.png","width":844,"height":230,"caption":"Softree Technology"},"image":{"@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/98740297642f06debccdcee2de84086b","name":"admin","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/softreetechnology.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6fc78c8a7aa3fb0bf43c3b9a2e3962d7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6fc78c8a7aa3fb0bf43c3b9a2e3962d7?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/softreeconsulting.com"],"url":"https:\/\/softreetechnology.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts\/7278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/comments?post=7278"}],"version-history":[{"count":1,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts\/7278\/revisions"}],"predecessor-version":[{"id":7280,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/posts\/7278\/revisions\/7280"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/media\/7279"}],"wp:attachment":[{"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/media?parent=7278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/categories?post=7278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softreetechnology.com\/blog\/wp-json\/wp\/v2\/tags?post=7278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}