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

Can you make an image larger than the form containing it?

Hi,

 

I'm building a "Kudos" app.  I have a gallery of thank you cards, and when you select "read more" it popups with all the card details.

 

I have 2 forms being displayed (pulling from the same list) so I could format it the way I wanted.  I have an image behind the forms, and when I went to add code to change the image based on specific data I realized my image needs to be inside the form to work.  

 

This is the code I use in the main gallery to display the correct image based on the directorate the employee works in

 

If(nDirectorate.Value = "FMD", CONTENTbox_blue [, nDirectorate.Value = "AQD",CONTENTbox_teal],CONTENTbox_yellow)  

 

nDirectorate is a choice column in my sharepoint list.  This works great if the image is located in a form.

 

Is there either a way to pass the variable nDirectorate.Value = "FMD" when I declare the popup=true?  Or, is there a way to make an image stretch larger than the form?

 

Here's a screenshot of it (the image works, but I'd like to conditionally set the image based on which directorate the employee works in)

popup-help.png

 

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Can you make an image larger than the form containing it?

Hi @aharsh ,

Do you want the image to be set based on which image was selected in the gallery?

Could you tell me the setting of the image in the gallery?

Usually, we do not use image to represent the selected item in the gallery.

We use a field to justify.

For example:

field1 is one field in your gallery's Item. It could have these value: 

"AQD", "FMD","OD"

Then you could set the popup image control's Image like this:

If(Galleryname.Selected.field1 = "AQD", CONTENTbox_blue, 
   Galleryname.Selected.field1=  "FMD",CONTENTbox_teal
   Galleryname.Selected.field1=  "OD",CONTENTbox_purple,
   CONTENTbox_yellow
)
//please replace with your  Galleryname, fieldname
CONTENTbox_blue, CONTENTbox_teal,CONTENTbox_purple,CONTENTbox_yellow should be some images names

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Can you make an image larger than the form containing it?

Hi @aharsh ,

Do you want to change this image's size based on nDirectorate.Value value?

4234.PNG

 

The image is just a  component of a form.

Firstly, I'm afraid it's not supported to make a component of a form bigger then the form.

Secondly, if you want to make it larger, you could insert another popup window with the same picture.

Then set the new popup window larger than this form.

 

Secondly, could you describe more clearly about this sentence:

pass the variable nDirectorate.Value = "FMD" when I declare the popup=true?

The nDirectorate.Value will not change if you declare the popup=true.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper II
Helper II

Re: Can you make an image larger than the form containing it?

Thank you @v-yutliu-msft for taking time to respond.

 

Since I can't make the image larger than the form container, how would I conditionally choose the image?  

 

On my gallery screen I have an image in my form and I conditionally set that image using this code:

 

If(nDirectorate.Value = "AQD", CONTENTbox_blue, If(nDirectorate.Value = "FMD",CONTENTbox_teal, If(nDirectorate.Value = "OD",CONTENTbox_purple,  CONTENTbox_yellow)))

 

When I open the popup window I use this code:

 

UpdateContext({Popup:true})

 

When the window opens, I want the image to be set based on which image was selected in the gallery.  I tried this, but it didn't work.  I'm not sure where to declare this condition and what the code should look like.

 

If(nDirectorate.Selected = "AQD", CONTENTbox_blue, If(nDirectorate.Selected = "FMD",CONTENTbox_teal, If(nDirectorate.Selected = "OD",CONTENTbox_purple,  CONTENTbox_yellow)))
Highlighted
Community Support
Community Support

Re: Can you make an image larger than the form containing it?

Hi @aharsh ,

Do you want the image to be set based on which image was selected in the gallery?

Could you tell me the setting of the image in the gallery?

Usually, we do not use image to represent the selected item in the gallery.

We use a field to justify.

For example:

field1 is one field in your gallery's Item. It could have these value: 

"AQD", "FMD","OD"

Then you could set the popup image control's Image like this:

If(Galleryname.Selected.field1 = "AQD", CONTENTbox_blue, 
   Galleryname.Selected.field1=  "FMD",CONTENTbox_teal
   Galleryname.Selected.field1=  "OD",CONTENTbox_purple,
   CONTENTbox_yellow
)
//please replace with your  Galleryname, fieldname
CONTENTbox_blue, CONTENTbox_teal,CONTENTbox_purple,CONTENTbox_yellow should be some images names

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

Highlighted
Helper II
Helper II

Re: Can you make an image larger than the form containing it?

Incredible @v-yutliu-msft , I had given up and made it a default image, but you helped me make it work!!  Thank you so much!

 

I had to add .value, but it works great. Thank you!  

 

If(GalleryName.Selected.FieldName.Value =  "AQD", detailsBG_Blue, GalleryName.Selected.FieldName.Value = "FMD",detailsBG_teal, 
GalleryName.Selected.FieldName.Value = "OD",detailsBG_purple, detailsBG_yellow ) 

 

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

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

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!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (11,349)