knowledgecenter-breadcrum

Knowledge Center

15 Mar, 2022

Add Multiple File control on the basic form of PowerApps Portal

Posted on 15 Mar, 2022 by Admin, Posted in Power Platform PowerApps Portal

Add Multiple File control on the basic form of PowerApps Portal Blogs

Add Multiple File control on the basic form of PowerApps Portal

Introduction: In this blog, we will understand how to add multiple file control on the basic form of PowerApps Portal.

Steps to be followed:

Before adding multiple file control you have to enable file attachment on the basic form.

Refer to this blog to enable file attachment on the basic form: https://vblogs.in/file-attachment-on-basicentity-form-in-powerapps-portal/

  1. Go to PowerApps Portal basic form where you have added file control.

2. Inspect the control.

3. Right click on the element and click on “Edit as HTML”

4. Copy HTML.

After copying the HTML go to the Portal Management App.

  1. Go to the basic form
  2. Open the basic form –> Go to the “Additional settings” tab –> Go to the Custom JavaScript section.

3. Paste the JavaScript code in this section.

Code:

$(document).ready(function () {

    ///Additional File 1

    $("#AttachFile").closest('.tr').after($('
<input accept="*" aria-label="Attach a file..." id="AttachFile1" multiple="multiple" name="ctl00$ContentContainer$EntityFormControl_d75cd87c6a73ec118943000d3a352079$EntityFormControl_d75cd87c6a73ec118943000d3a352079_EntityFormView$AttachFile" type="file" />
')); ///Additional File 2 $("#AttachFile1").closest('.tr').after($('
<input accept="*" aria-label="Attach a file..." id="AttachFile2" multiple="multiple" name="ctl00$ContentContainer$EntityFormControl_d75cd87c6a73ec118943000d3a352079$EntityFormControl_d75cd87c6a73ec118943000d3a352079_EntityFormView$AttachFile" type="file" />
')); })

NOTE:
In the after function paste the HTML which we copied in an earlier step, also update the id of the HTML element.

4. After adding the JavaScript Save the basic form, Navigate to Portal to see the changes.

Testing:
Upload the files in each control and save the record. All the files will be created as notes in dynamics successfully.

Comment

This is a Required Field

Loading

Recent Updates

Blogs
07 Sep, 2023

Optimizing Storage with SubscriptionTrackingDeletedObject Cleanup

What is SubscriptionTrackingDeletedObject? The "SubscriptionTrackingDeletedObject" table is linked to the "DeletionService," which handles two types of cleanup: organization-wide and record-specific.…

READ MORE
Blogs
05 Sep, 2023

How to create real-time customer journeys in Dynamics 365 Marketing

Introduction: This blog will show how to create real-time customer journeys in Dynamics 365 Marketing. Customer journeys can be either…

READ MORE
Blogs
30 Aug, 2023

D365 CUSTOMER SERVICE: CUSTOMER 360 COMPONENT

Introduction: In Dynamics 365 (D365) Customer Service, the 'Customer 360' Component provides a comprehensive view of information and enables users…

READ MORE