cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
turnbe
Level: Powered On

Query data source with Asset and return another column

I'm sure this isnt that hard to solve, but I'm googling like mad and just can find the right thing, so apologies if this is simple.

 

I have a data source of a sharepoint list called "Cylinder" it has many columns, but I talking about the columns "AssetNumber" and "OkToFill"

 

In my app I'm using the ScanBarcode function to bring in the asset number (its a barcode on the cylinder) through into a variable "ScannedAsset". I'm then displaying the asset number in a label, and have two icons, which is a big 'tick' and big 'cross'

 

The problem

I need to somehow check the datasource "Cylinder" for the matching "ScannedAsset" in the column "AssetNumber" and then return the related value in the column "OkToFill" and if that value is "yes" then set the tick icon to visible and if "no" set the cross icon to visible.

 

Any help appreciated.

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Query data source with Asset and return another column

Hi @turnbe,

 

I suppose that the "AssetNumber" and "OkToFill" columns are Number and Yes or No column type. If this is incorrect, please correct me in next reply.

 

Assume that the name of the Label control which holds the "ScannedAsset" variable is "Label1".

 

Insert a Gallery control. Set its Items property to:

Filter(Cylinder,AssetNumber=Value(Label1.Text))

Select the first part of the Gallery(which is the template part of the gallery control), insert the Tick and Cross icons.

Set the Visible property of Tick icon to:

If(ThisItem.YesNo.Value="Yes",true,false)

Set the Visible property of Cross icon to:

If(ThisItem.YesNo.Value="No",true,false)

Capture.JPG

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Query data source with Asset and return another column

Hi @turnbe,

 

I suppose that the "AssetNumber" and "OkToFill" columns are Number and Yes or No column type. If this is incorrect, please correct me in next reply.

 

Assume that the name of the Label control which holds the "ScannedAsset" variable is "Label1".

 

Insert a Gallery control. Set its Items property to:

Filter(Cylinder,AssetNumber=Value(Label1.Text))

Select the first part of the Gallery(which is the template part of the gallery control), insert the Tick and Cross icons.

Set the Visible property of Tick icon to:

If(ThisItem.YesNo.Value="Yes",true,false)

Set the Visible property of Cross icon to:

If(ThisItem.YesNo.Value="No",true,false)

Capture.JPG

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

turnbe
Level: Powered On

Re: Query data source with Asset and return another column

Hi Mona

 

Thanks for the help, I've got it working from your suggestions.

 

Do you know if its possible to have it list the scanned items in the gallery with the corresponding ticks or crosses? i.e. if I scanned 6 assets, they would list down the Gallery?

 

At the moment, when you tap the camera button it puts the scanned data into "ScannedAsset"

Set(ScannedAsset, ScanBarcode())

So on the gallery I set the filter to be

Filter(Cylinder,AssetNumber=Value(ScannedAsset))

So I'm not sure if it's possible to list multiple.

 

Thank you for the help.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 364 members 4,463 guests
Please welcome our newest community members: