Archive

Archive for the ‘SharePoint online’ Category

PowerApps : Move SharePoint custom list form to different site

December 18, 2023 Leave a comment

Hello Friends,

I recently done some modification to SharePoint list form in PowerApps, I done all modifications and tested it as well. Everything was as per expected but now i was having requirement to move this form to another list in different site. I thought it is very straight forward requirement but to my surprise, i do not found direct option to export it. I seen this export option was there previously but now Microsoft have removed it. As SharePoint custom list forms are not listed in apps list hence we can’t use the default export option, so now how to export the SharePoint custom list form built using PowerApps to another site inside same tenant?

There are two ways using which we can export the list form.

I have created a sample SharePoint list, where list form is modified.

Main parent list holding just Title values.

Parent List

Child list 1, holding reference using parent list ID column to Lookup_ID

Child List 1

Child list 2, holding reference using parent list ID column to Lookup_ID

Child List 2

I have modified the list form to just view values for current selected items and also using LookUp function matching value from list Child1PATest and Child2PATest list.

List Form view purpose

Option 1 –

  1. Open the custom SharePoint list form.
Open SP List Form in PowerApps studio
Open SP List Form in PowerApps studio

2. Press Ctrl+Shift+S

Ctlr+Shift+S

3. Click on the “Save” Option from the left menu and click on “See all versions”.

Save

Now you can see “Export package” option on the top.

Export Option

Option 2 –

  1. Go to List settings and click on ‘Form settings’
List Settings

2. Select “See versions and usage” option

Form Settings

3. Now you can see “Export package” option on the top.

Export Option from list settings

In upcoming post I will share how to migrate connections to different site. Sharing is caring.

Error while creating app catalog – Updates are currently disallowed on GET requests. To allow updates on a GET, set the ‘AllowUnsafeUpdates’ property on SPWeb

December 12, 2023 Leave a comment

Hello friends,

Recently after creating a dev tenant, I proceeded to create tenant level app catalog site as I was setting up the SPFX environment. I selected ‘Create a new app catalog site’ and added needed details.

New App Catalog Creation
New App Catalog Creation
New App Catalog details
New App Catalog details

I got an error “Updates are currently disallowed on GET requests. To allow updates on a GET, set the ‘AllowUnsafeUpdates’ property on SPWeb” when i tried to create a new catalog site.

New App Catalog Error
New App Catalog Error

After scratching head and after some googling, i found out that we need at least one site collection created other than the default site gets created with tenant. Then only new app catalog creation will work.

New Sample Site Creation
New Sample Site Creation

So, i have created a Test site and tried again to create new app catalog and voilà, it worked.

Looking like Microsoft should improve on error handling.

Sharing is caring.

SharePoint online: Error ‘Updates are currently disallowed on GET requests. To allow updates on a GET, set the ‘AllowUnsafeUpdates’ property on SPWeb’ while creating new app catalog site

July 6, 2020 2 comments

Recently I have created new E5 personal tenant for my development and testing purpose. I wanted to deploy and test the SPFx component in that tenant, hence I tried to create the App catalog.

I directly went to SharePoint admin center in Office 365 and tried to create new App catalog site, like following.

App catalog Creation

App catalog Creation

I got the error ‘Updates are currently disallowed on GET requests. To allow updates on a GET, set the ‘AllowUnsafeUpdates’ property on SPWeb’.

App catalog Creation Error

App catalog Creation Error

I initially thought that the error is due to some technical glitch and no clear reason of the error explained in error and hence I tried to create App catalog site couple of times more but no luck and got the same error.

The solution is bit weird as I just created new tenant, I do not have any site created yet and I jumped directly to create app catalog site.

Then I have created one test site in tenant.

One Site Created

One Site Created

And it worked, I again tried creating the App catalog site and it worked.

App Catalog Success

App Catalog Success

So we need to at least create one site before creating App catalog. The only concern is Microsoft should provide some meaningful error message so that we will not be confused.

Sharing is caring, stay safe. Take care.

SharePoint online / SharePoint 2013: Sharing variable values between search control and display templates

November 29, 2017 Leave a comment

Recently I came across to a scenario where I need to set the variable in control template and the value of the variable should be accessible in item template and vice versa.
I was showing some data in item templates and using third party pagination for displaying the search result, needed the value of pagination size which is available in control template.
I tried with normal JavaScript variable but due to the scoping in display template it was not available for me inside the item template.
Solution 1:
We can use Windows.variable which is nothing but global variable creation on the scope of the window object and hence will be accessible throughout the scope of windows object.
Control Template:

<!--#_ window.PageSize = "30"; _#-->

Item Template:

<!--#_ alert(window.PageSize); _#-->

Solution 2:
Another better alternative is to use the built-in ctx object which is already shared between the control and item display template.
Control Template:

<!--#_ ctx.PageSize = "30"; _#-->

Item Template:

<!--#_ alert(ctx.PageSize); _#-->

Happy learning.