cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
virakones
Resolver II
Resolver II

Text Label based on GET request using a Collected value not updating consistently

Hello,

 

I have a Powerapp that will display details of an Order.

 

The user will search the database using an Order Id entered through a Text input. On Change of the text label (hitting enter) I will call an API to Get the related Order details and Collect that to reference in some Galleries.

 

OnChange: 

Set(
    varSearchValue,
    Self.Text
);
ClearCollect(
    colOrder,
        MyAPI.GetOrdersByNumber({OrderNumber: varSearchValue})
)

 

 

I will display the Orders main item groups in a main Gallery, and details of those item groups in a child sub-Gallery within the main gallery.

Ex. Item group Gallery - First(colOrder).itemGroups

> Products Ordered (subGallery2)ThisItem.products

>product name - ThisItem.productId
>product name - ThisItem.productName
>product quantity -ThisItem.productQuantity
>etc.

 

In the Sub-gallery, I have a text label that will do another Get request based on Id values retrieved from the Collection from the initial text input to retrieve the Products SKU.

 

Text: MyAPI.GetProductsById(ThisItem.productId).sku

 

 

However, if I type in several orders in succession, I find that, consistently, the text labels in the sub gallery do not update to the correct SKU of the specific product - even though the Collection details are correctly updated and that it theoretically should be making the correct API call.

 

I'm not able to "refresh" or "reset" a text label so I'm not sure what else I can do here to ensure that the text label is always displaying the correct value.

 

 

0 REPLIES 0

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,696)