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
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

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

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (41,846)