cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JMGCORNATOR
Helper I
Helper I

Not able to get pictures from JSON

Hello there,

 

I have an app which is connected to a flow. The app scans a barcode and returns item informations and picture from Business Central. The flow takes the item-id and uses a HTTP Get-call to retrieve the item picture which is then sent back to the app in the following manner:

 

1. In Flow i use the call 

 

GET https://api.businesscentral.dynamics.com/v1.0/<Tenant ID>/api/v1.0/companies(<Company ID>)/items(<Item ID>)/picture(<Item ID>)

 

The returned is stored in a JSON-variable using a "initialize variable"-element. This is then sent back to powerapps using a "respond"-element.

2. In powerapps i have connected the flow to my scan-button. OnScan-property is defined as:

 

Set(
    VarItemID;
    LookUp(
        colworkflowitems;
        'No.' = BarcodeScanner3.Value;
        Id
    )
);;
Set(
    VarFlowJSON;
    Getitempicture.Run(VarItemID)
)

 

The item-id is obtained from a collection created when starting the app. The JSON is loaded into a collection.

 

3. The image-control is then set to

 

VarFlowJSON.'content@odata.mediaReadLink'

 

 

However, nothing happens. The link parsed to the image control is:

 

https://api.businesscentral.dynamics.com/v1.0/<Tenant ID>/api/v1.0/companies(<Company ID>)/items(<Item ID>)/picture(<Item ID>)/content

 


I am unsure if i can use this link at all. 

How do i move on from here?

cheers!

3 REPLIES 3
Eelman
Super User
Super User

@JMGCORNATOR there maybe something in this thread that can help you out?

 

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/HTML-Control-In-Gallery-ThisItem-Pi...

 

@seadude did you get your image working?

seadude
Memorable Member
Memorable Member

Newp.

dyee4614
Helper V
Helper V

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

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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 Solution Authors
Top Kudoed Authors
Users online (2,025)