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

How to emit msg to service bus through the the context field.

Hi,

 

I am having issue on getting the powerapp to emit data to the service bus.  The way how our app works is we will make an api call and get a json obj.  I want to submit this json string to the service bus so the donwstream webservice can pick it up.

 

I was looking at the details of the data structure in here   https://www.carlosag.net/PowerApps/Connectors/Service-Bus#_Toc46F4A95A_ServiceBusMessage. It does not have any example of what the contentType is.  I tried a few thing such as "application/json".  The "context data" did not make it to the service bus. 

 

Does anyone know what it takes to submit "context data" to service bus, and not through "table" properties?

 

**** code

AzureServiceBus.SendMessage("servicebusdev", {systemProperties:"None",

ContentData: "some text", <---- what do we put in the contextdata and content type??????

ContentType:"String", <---- ????

Label:"Heading",

Properties: Table({key : First(myrec).FieldName, value : First(myrec).FieldValue})  <--- this works but we don't want it into the custome properties...also we have like 9 rec.  It will be quite a bit of hassle to get each rec value to go in this way

} )

***

Also in above test setup, assume we pass the json string instead of "some text" in IE F12 using the same code, we also see this error (see attached)...Is there something wrong with our powerapp setup?

 

Thanks,

Johnny

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuxima-msft
Community Support
Community Support
4 REPLIES 4
v-yuxima-msft
Community Support
Community Support

Hi,

 

I looked at the vote topic. 

https://powerusers.microsoft.com/t5/General-Discussion/How-to-emit-msg-to-service-bus-through-the-th...

 

Looks like developers were at least able to submit the content somehow to the service bus (ContextData),  just cannot retrieve the content back.   

 

I had tried ContentType = "text/plain" and “text/html" in my code instead of "string"    Both did not work.     If anyone out there see what is the issue of our problem, please let us know.  Thanks.

 

 

 

Hi @johnnyL 

 

You can also submit one ticket here:

https://powerapps.microsoft.com/en-us/support/

 

Hope this could be helpful.

 

Best Regards.

Yumia

nsearle97
New Member

Hi @johnnyL 

Was there a solution to this? I am having the exact same issue with this simple function:

ServiceBus.SendMessage("myqueue", {ContentData: "Test Message", ContentType: "String"})

The message arrives in the queue but is blank

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,429)