cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aa12
Microsoft
Microsoft

Trying to upload text input as a table

Hello,

 

I am trying to Post to an API from my custom connector. The request format is:

{ "id": null, "name": "something", "type": "String", "url": null, "items": [ "Blue", "Green", "Red" ], "isSuggested": false }

 

My code is:

Connector.POST(

{

name: DataCardValue21_2.Text,

type: DataCardValue22_2.Selected.Value,

isSuggested: DataCardValue19_2.Selected.Value,

items: Split(DataCardValue18_2.Text, ",")

}

);

 

name, type, and isSuggested are all fine. Items needs to be submitted as an array of strings.

If I use:

items: DataCardValue18_2.Text, I get "Incompatible type. The 'items' column in the data source you’re updating expects a 'Table' type and you’re using a 'Text' type.

So, therefore I need to submit as a table. The documentation does state that Split() returns a table, which is what I want.

When I use items: Split(DataCardValue18_2.Text, ","), I get: Missing column. Your formula is missing a column 'items.Value' with a type of 'Text'.

 

What is the correct way to upload this as a table here?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
RusselThomas
Microsoft
Microsoft

Hi @aa12 ,

Big fat hairy guess, but try using;

RenameColumns(Split(DataCardValue18_2.Text, ","), "Result", "Value")

Kind regards,

RT

View solution in original post

2 REPLIES 2
RusselThomas
Microsoft
Microsoft

Hi @aa12 ,

Big fat hairy guess, but try using;

RenameColumns(Split(DataCardValue18_2.Text, ","), "Result", "Value")

Kind regards,

RT

View solution in original post

Works for me! Thanks a lot!

Helpful resources

Announcements
PA 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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (81,415)