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

Possibility of effect if new record is added in Gallery

Hey guys,

 

Just asking whether there's a built-in feature of PowerApps if a new record is added that an effect might appear, for example flashing up briefly...

 

Thanks so much for helping!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

@ThePowerAppsGuy 
Its possible but you must build it for yourself, its not built in.  I will show you how by using a simple example.  Suggest you give it a try before applying to your own gallery.

flashing-insert.gif

First, create a button and put this code in the OnSelect property.  Click the button.

 

ClearCollect(colGalleryItems,
    {ID:1},
    {ID:2},
    {ID:3}
 );

 

 

Then create a blank gallery and use this code in the Items property of the gallery

 

colGalleryItems

 

 

Place a new label inside the gallery with this code in the Text property.  Now the gallery will display the numbers 1, 2, 3.

 

ThisItem.ID

 

Now our gallery is setup.  Its time to insert a new record and make the item flash when its added.

 

Make a new button outside the gallery and put this code in the OnSelect property.  Don't click it yet.  This creates a new record.

 

Set(newRecord, Patch(colGalleryItems, Defaults(colGalleryItems), {ID: 4}));

 

Now inside the gallery insert a new timer control called Timer_New with these properties

 

Duration: 1000
Start: newRecord.ID=ThisItem.ID

 

Also, inside the gallery place a label behind all of the other controls with these properties.  The fill property is what makes the record flash.

 

 

Height: Gallery1.TemplateHeight
Width: Gallery2.TemplateWidth

Fill: 
    RGBA(255, 255, 0, 
    If(
        Timer_New.Value < Timer_New.Duration/2,
        Timer_New.Value/Timer_New.Duration,
        1-(Timer_New.Value/Timer_New.Duration)
    )
)

 

We're finished.  Click the newRecord button to add {ID: 4} to the gallery and the item will flash a yellow color.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

7 REPLIES 7
Highlighted
Super User III
Super User III

@ThePowerAppsGuy 
Its possible but you must build it for yourself, its not built in.  I will show you how by using a simple example.  Suggest you give it a try before applying to your own gallery.

flashing-insert.gif

First, create a button and put this code in the OnSelect property.  Click the button.

 

ClearCollect(colGalleryItems,
    {ID:1},
    {ID:2},
    {ID:3}
 );

 

 

Then create a blank gallery and use this code in the Items property of the gallery

 

colGalleryItems

 

 

Place a new label inside the gallery with this code in the Text property.  Now the gallery will display the numbers 1, 2, 3.

 

ThisItem.ID

 

Now our gallery is setup.  Its time to insert a new record and make the item flash when its added.

 

Make a new button outside the gallery and put this code in the OnSelect property.  Don't click it yet.  This creates a new record.

 

Set(newRecord, Patch(colGalleryItems, Defaults(colGalleryItems), {ID: 4}));

 

Now inside the gallery insert a new timer control called Timer_New with these properties

 

Duration: 1000
Start: newRecord.ID=ThisItem.ID

 

Also, inside the gallery place a label behind all of the other controls with these properties.  The fill property is what makes the record flash.

 

 

Height: Gallery1.TemplateHeight
Width: Gallery2.TemplateWidth

Fill: 
    RGBA(255, 255, 0, 
    If(
        Timer_New.Value < Timer_New.Duration/2,
        Timer_New.Value/Timer_New.Duration,
        1-(Timer_New.Value/Timer_New.Duration)
    )
)

 

We're finished.  Click the newRecord button to add {ID: 4} to the gallery and the item will flash a yellow color.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted

@mdevaney

Thanks so much for your detailed reply. Gonna check it out...

 

 

Highlighted

@ThePowerAppsGuy 

Understood.  My response was quite lengthy.  I will post a sample GIF of what the app looks like once I get to a computer.  On my phone now.

Highlighted

Really appreciate your commitment. Thanks so much 🙂.

Highlighted

@ThePowerAppsGuy 

I appreciate new and interesting questions.  Yours was both of these so I definitely had to try and solve it 🙂

Highlighted

@ThePowerAppsGuy 
I am curious to know whether you got this working on your side.  I've included a GIF now as an example what the finished product looks like.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted

Hey @mdevaney,

 

It's working quite fine and I wouldn't have succeeded without your help.

Thank you once again 👍.

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

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