Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

component property settings for using patch

(2) ShareShare
ReportReport
Posted on by 36
Hello Everyone,

i build a component which is a simple slider. I use this component in my app and i want to do a Patch on a browse galery item when slider is on 100. In my component i build a property named "onAction" and i tried every property to use the patch in the app with "onAction" but it doesnt work. FYI i have another property called "OnchangeSlider" which is type number. In my app i can ask on which number my Slider is standing. I know that i have to use this. But it doesnt work.
 
Can u help?

 
  • Verified answer
    YoshiIsTesting Profile Picture
    YoshiIsTesting 36 on at
    component property settings for using patch
    Set(MySliderNumber,SwipeComponent_4.SliderValue);
    If(MySliderNumber > 50 ,Patch(ApprTable,LookUp(ApprTable,Dokumentnummer = ApprTableID), { 'Status (new_status)': 'Status (ApprTable)'.Genehmigt });Notify("Patched Accepted");,Patch(ApprTable,LookUp(ApprTable,Dokumentnummer = ApprTableID), { 'Status (new_status)': 'Status (ApprTable)'.Abgelehnt });Notify("Patched Denied"));
    Refresh(ApprTable);
    UpdateContext(
        {
            SelectedIDRecord: LookUp(ListItemswithID,ID > SelectedIDRecord.ID)
        });  
    If(IsBlank(SelectedIDRecord),
        Back(),
    //else
        UpdateContext(
            {
                SelectedRecord: LookUp(ApprTable,Dokumentnummer = SelectedIDRecord.Record.Dokumentnummer)
            });
        ResetForm(Form2_1););

    this works. 
  • YoshiIsTesting Profile Picture
    YoshiIsTesting 36 on at
    component property settings for using patch
    Hello 
    thanks for response. i tried notify() and it works. Except patch: 


  • component property settings for using patch
    Hello 
    of course i tried notify() it works. 

    Here is the code: 



  • KeithAtherton Profile Picture
    KeithAtherton 3,640 on at
    component property settings for using patch
    Hey. Is the onAction property firing as expected when slider is on 100? A quick way to check would be to notify the user by calling the Notify() function.
     
    If it is firing, please share the Power Fx code containing the Patch() function call.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard