cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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
Highlighted
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

Highlighted
Microsoft
Microsoft

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (17,137)