Implementing Updates for a SharePoint Hyperlink Column with the Patch Function in Power Apps

Implementing Updates for a SharePoint Hyperlink Column the Patch Function in Power Apps 

Introduction to SharePoint List Updates

Creating Your SharePoint List:

  • Firstly, sign into the Sharepoint portal.  
  • Then, select your desired site collection to create a new list.
  • Navigate to the ‘Gear’ icon in the upper-right corner and select ‘Site Contents’.
In Sharepoint navigate to the ‘Gear’ icon and proceed to choose ‘Site Contents to perform Hyperlink Column the Patch Function in Power Apps

Next, click the ‘New’ button and choose ‘List’.

Navigating to ‘New’ and choosing the ‘List’ option to perform Hyperlink Column the Patch Function in Power Apps

You’ll be directed to the ‘Create a SharePoint list’ page. Here, opt for the ‘Blank list’ option.

In SharePoint list page navigate to blank list to perform Hyperlink Column the Patch Function in Power Apps

Afterward, give your list a name and an optional description, and hit ‘Create’.

Assigning a Name to the list to perform Hyperlink Column the Patch Function in Power Apps

Adjusting List Settings:

To change the “Title” column to “Not Required,” go back to the ‘Gear’ icon and click on ‘List Settings’.

In the Columns section, select ‘Title’.

Now, choose “No” to indicate that this column should not require information and click ‘Save‘.

Make Require option to No from sharepoint list settings
choosing the Save option to perform Hyperlink Column the Patch Function in PowerApps

Moreover, you can add more columns by selecting the ‘+Add column’ function.

Include “Name” (single-line of text), “Hyperlink” (Hyperlink), and “Description” (single-line of text) columns.

Designing the Patch Function in Power Apps:

Creating a New Canvas App: : 

  • Initially, log into the Power Apps portal
  • Click on “Create” and select “Canvas app from blank”.
Creating a Canvas app from blank to perform Hyperlink Column the Patch Function in Power Apps

Title your app and choose the format suitable for tablet devices.

Accessing SharePoint Data:

In the app, proceed to the “Data” section on the left-hand menu. Here, select “Add data” and search for “SharePoint”.

Connecting the data source with Canvas app to perform Hyperlink Column the Patch Function in Power Apps

Following this, opt to ‘Add a connection’.

Connecting the data source with Canvas app to perform Hyperlink Column the Patch Function in Power Apps step 2

For the connection, use the “Recent sites” list or manually input the site’s URL. Once you have inputted the URL, click on “Connect”.

Establish a connection to a SharePoint site to perform Hyperlink Column the Patch Function in Power Apps

Connecting to Your List:

After establishing a connection, check the boxes next to the lists you wish to use, and then click ‘Connect’.

Choose a list section to perform Hyperlink Column the Patch Function in Power Apps

Setting Up the User Interface:

To start, create a title bar with a “Label” at the top of the screen and name it “Hyperlink”.

Adding a Label at top of the screen bearing the text Hyperlink to perform Hyperlink Column the Patch Function in Power Apps
Adding a Label at top of the screen bearing the text Hyperlink to perform Hyperlink Column the Patch Function in Power Apps step-2

Furthermore, please integrate these configurations. 

Customization on the label to perform Hyperlink Column the Patch Function in Power Apps

Subsequently, add “Text Labels,” “Text Input,” and a “Button” to the screen, labeling them as “Name,” “Hyperlink,” and “Description”.

  • Incorporating descriptive elements within each designated “Labels.” 
  • Name 
  • Hyperlink 
  • Description 
Adding the descriptive elements within each designated Labels to perform Hyperlink Column the Patch Function in Power Apps

Additionally, set the ‘size‘ parameters for each ‘Label’.

Designing the size into their respective labels to perform Hyperlink Column the Patch Function in Power Apps

Ensure the “Default” property value of the “Text input” is left empty.

Preserving the Default value of the Text input as empty to perform Hyperlink Column the Patch Function in Power Apps

Also, adjust the ‘size’ and ‘Left Padding’ for the ‘Text Input’ elements.

Implementing the Button's Patch Function:

Set the designated size parameters into the associatedButton element. 

Set the designated 'size' parameters into the associated 'Button' element for Hyperlink Column the Patch Function

To facilitate the transfer of data utilizing the ‘PATCH’ method within the ‘Button’ interface. 

Using Patch function at OnSelect property of button for Hyperlink Column the Patch Function

For updates, insert the following code into the ‘OnSelect’ property of the button:

				
					// Add a new entry to the Hyperlink list.
Patch(
    Hyperlink,
    Defaults(Hyperlink),
    {
        Name: TextInput1.Text,
        Hyperlink: TextInput2.Text,
        Description: TextInput3.Text
    }
);

				
			

After saving, reset the ‘Text input‘ fields to their default state:

Initiating the Reset after Patch function at OnSelect property of button for Hyperlink Column the Patch Function

Resetting the Form:

Subsequent to the submission, reset the ‘Text input‘ fields using the code:

				
					//Generate a novel entry within the Hyperlink database.
Patch(
    Hyperlink,
    Defaults(Hyperlink),
    {
        Name: TextInput1.Text,
        Hyperlink: TextInput2.Text,
        Description: TextInput3.Text
    }
);
//To commence a reset operation for the Text input
Reset(TextInput1);
Reset(TextInput2);
Reset(TextInput3)
				
			

Confirming Submission:

Finally, affirm the successful submission with a notification:

After Submittion of data Success notification for Hyperlink Column the Patch Function
A view of code for Success notification after Submittion of data for Hyperlink Column the Patch Function

Adding the code to implement a success notification display. 

				
					//Generate a novel entry within the Hyperlink database.
Patch(
    Hyperlink,
    Defaults(Hyperlink),
    {
        Name: TextInput1.Text,
        Hyperlink: TextInput2.Text,
        Description: TextInput3.Text
    }
);
//To commence a reset operation for the Text input
Reset(TextInput1);
Reset(TextInput2);
Reset(TextInput3);
//To Display a Success Notification
Notify(
    "Your hyperlink has been successfully submitted",
    NotificationType.Success
)
				
			

Reference: Patch function

The Conclusive Appearance of this Application

The Conclusive Appearance performing Hyperlink Column the Patch Function in Power Apps

Conclusion and Testing:

In conclusion, your app should now provide a seamless process for updating SharePoint Hyperlink columns. Importantly, conduct thorough testing to ensure everything functions as intended.

If you want to learn more about the Power Apps, feel free to explore our other informative articles and tutorials.

Have additional inquiries? Our team is here to assist. Please don’t hesitate to reach out!

About The Author