cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
e-rodrigues
Frequent Visitor

Bad Gateway - Creating Columns in Document Library

Hi guys,

 

Here's my situation - I've got a document library that needs to be implemented in future sites inside my tenant and also in already existent ones, so with that I'm trying to get a flow to generate both the document library and to add the columns with the options that I need in them.

 

1st part is done - Already got a flow working that creates the Document library.

 

Now the flow that generates the custom columns I'm gonna need, somehow... decided to just not work and get me a Bad Gateway every time I run.

 

e-rodrigues_0-1601591755895.png

Body:

{'__metadata': {'type': 'SP.Field', 'Name': 'Codigo', 'Title': 'Codigo', 'FieldTypeKind': 2}}

 

I've search all around about the structure for the request of the body and it looks all good.

Do you guys have any idea on what may be happening here

 

e-rodrigues_1-1601592202383.png

Thanks guys!  😄

1 ACCEPTED SOLUTION

Accepted Solutions
e-rodrigues
Frequent Visitor

Found the Issue.

 

1st issue was - there's no "Name" property on the Field.

2nd issue was in the body of the request - The property Type is separated from the other properties in the metadata object. 

Before:

{'__metadata': {'type': 'SP.Field', 'Name': 'Codigo', 'Title': 'Codigo', 'FieldTypeKind': 2}}

After Fix:

{'__metadata': {'type': 'SP.Field'}, 'Title': 'Codigo', 'FieldTypeKind': 2}

 

View solution in original post

2 REPLIES 2
e-rodrigues
Frequent Visitor

Found the Issue.

 

1st issue was - there's no "Name" property on the Field.

2nd issue was in the body of the request - The property Type is separated from the other properties in the metadata object. 

Before:

{'__metadata': {'type': 'SP.Field', 'Name': 'Codigo', 'Title': 'Codigo', 'FieldTypeKind': 2}}

After Fix:

{'__metadata': {'type': 'SP.Field'}, 'Title': 'Codigo', 'FieldTypeKind': 2}

 

View solution in original post

askondo
Microsoft
Microsoft

@e-rodrigues I'm glad your problem has been solved. Please feel free to post again anytime.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Kudoed Authors
Users online (3,242)