cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

"Two options" data type use in power app for CDS connectors

Hi,

 

I have created one chemical entity and one Isflamable column with "Two options"  data type in CDS for canvas app. I am trying reading IsFlamable column on Image control's  Image property. if  Isflamable value is "No" then load 'Flamable_image' image on image control in canvas app. but it is not working.

 

Using below code on Image property of image control.

 

If('FlamableColumn (Chemical)'.No,Flammable_Image)

 

Error:- you don't have permission to view this data.

 

But when I use "'FlamableColumn (Chemical)'.No" on text box control's text property and it is working.

 

Here I want to know how can I compare Two options data type's column value with if function and want to update this column on button click. Please suggest.

 

Regards,

Lalit Kadam

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: "Two options" data type use in power app for CDS connectors

Hi @Lalit_Kadam ,

Could you please share a bit more about the error message within your app?

Could you please show more details about the Flammable_Image that you mentioned? Is it a image data uploaded through the Media option in your app?

Further, do you display the image within a Gallery control?

 

If you display the image within a Gallery control, I think there is something wrong with the formula typed within the Image property of the Image control.

 

Please set the Image property of the Image control within the Gallery to following:

If(
   ThisItem.FlamableColumn = 'FlamableColumn (Chemical)'.No,
   Flammable_Image,
   SampleImage
)

Note: I assume that the Flammable_Image that you mentioned represents the image data uploaded through the Media option in your app rather than Image field in your CDS Entity.

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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
Highlighted
Helper V
Helper V

Re: "Two options" data type use in power app for CDS connectors

This isn't exactly an answer but for what it's worth, I've had much better luck using normal option sets even when I only have 2 options. Just define your options, Flammable, NotFlammable. Then you can call the values with [@optionsetname].Flammable or [@optionsetname].NotFlammable.

 

Just seems to work easier for me. 

Highlighted
Community Support
Community Support

Re: "Two options" data type use in power app for CDS connectors

Hi @Lalit_Kadam ,

Could you please share a bit more about the error message within your app?

Could you please show more details about the Flammable_Image that you mentioned? Is it a image data uploaded through the Media option in your app?

Further, do you display the image within a Gallery control?

 

If you display the image within a Gallery control, I think there is something wrong with the formula typed within the Image property of the Image control.

 

Please set the Image property of the Image control within the Gallery to following:

If(
   ThisItem.FlamableColumn = 'FlamableColumn (Chemical)'.No,
   Flammable_Image,
   SampleImage
)

Note: I assume that the Flammable_Image that you mentioned represents the image data uploaded through the Media option in your app rather than Image field in your CDS Entity.

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (7,574)