web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Enhanced compenent pro...
Power Apps
Suggested Answer

Enhanced compenent properties is working differently on Test and RPOD environments

(1) ShareShare
ReportReport
Posted on by 1,811 Super User 2024 Season 1
I have  a component library inside a solution, with 3 properties, 2 of them of type Event (named OnOkClick & OnOkCancel), as follow:-
 
 
 
 
 
I have this formula to delete 3 SharePoint items from 3 lists inside the OnOkClick inside "Enhanced component properties":-
 
 
IfError(RemoveIf(
    'Work Orders',
        ID = DashBoardGallery_1.Selected.ID
),
Notify(
    "Can not delete work order",
    NotificationType.Error
),
ForAll(varWOWOInfoDetails As wowo,
RemoveIf('Work Orders Work Order Info Details',ID=wowo.ID);
RemoveIf('Work Orders Info Details',ID=wowo.'Work Order Info Detail ID')
);
ForAll(varWOWOInfoDetails As wowo,
RemoveIf('Work Orders Info Details',ID=wowo.'Work Order Info Detail ID');
RemoveIf('Work Orders Work Order Info Details',ID=wowo.ID);
);
Notify(
    "Deleted successfully",
    NotificationType.Success
););
 
 
 
 
 
 
 
now on Test when i click on the delete icon, the 3 items will be removed:-
 
 
while on PROD, only items from 2 lists will be removed, so seems the items inside the "Work Orders Info Details" list will be skipped
 
 
 
.. although on both environments, i will get "Deleted Successfully"message.. so what could be the reason ?
 
Also recently i start to receive this error inside the formula ""invalid argument type . cannot use boolean values in this context power apps":-
 
 
so what is the error trying to say and is it related to the issue i am getting?
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
    Hi
     
    What does "Enhanced component properties": mean
    -Is this an Action an Event? What?
     
    How is this code called, from the App Side or from the App Component itself?
     
    Also for the error i'd have to see the entire code you have, as you are literally blocking it. Yes I see the semicolon, but I need to see the stuff above it and below it.
  • johnjohnPter Profile Picture
    1,811 Super User 2024 Season 1 on at
    "Enhanced components" is a feature to allow you to fire custom events, as mentioned in its description, i use it to build a reusable popups as mentioned in this link https://www.youtube.com/watch?v=SfxNHYvCgcw&pp=ygUhcmV1c2FiZWwgcG9wdXBzIGluc2lkZSBwb3dlciBhcHBz:-
     
     

     
    I am calling this code inside the "OnOkClick" inside the custom properties section of the component.

    Here is the full code:-
     
     
     
    ClearCollect(
        varWOWOInfoDetails,
        Filter(
            'Work Orders Work Order Info Details',
            'Work Order ID' = DashBoardGallery_1.Selected.ID
        )
    );
    ClearCollect(
        varWOSP,
        Filter(
            'Work Orders Spare Parts',
            'Work Order ID' = DashBoardGallery_1.Selected.ID
        )
    );
     
    ForAll(varWOSP As wosp,
    Collect(
        varWOSPWOSPAPP,
        Filter(
            'Work Order Spare Parts Work Order Spare Part Approvals',
            'Work Order Spare Part ID' = wosp.ID
        )
    ));
     
    IfError(RemoveIf(
        'Work Orders',
            ID = DashBoardGallery_1.Selected.ID
    ),
    Notify(
        "Can not delete work order",
        NotificationType.Error
    ),
    ForAll(varWOWOInfoDetails As wowo,
    RemoveIf('Work Orders Work Order Info Details',ID=wowo.ID);
    RemoveIf('Work Orders Info Details',ID=wowo.'Work Order Info Detail ID')
     
    );
    ForAll(varWOWOInfoDetails As wowo,
     
    RemoveIf('Work Orders Info Details',ID=wowo.'Work Order Info Detail ID');
    RemoveIf('Work Orders Work Order Info Details',ID=wowo.ID);
    );
     
    ForAll(varWOSP As wosp,
     
    RemoveIf('Work Orders Spare Part Details','Work Order Spare Part ID'=wosp.ID)
     
    );
     
    ForAll(varWOSPWOSPAPP As wospwoapp,
     
    RemoveIf('Work Orders Spare Part Approvals',ID=wospwoapp.'Work Order Spare Part Approval ID');
     
    );
    ForAll(varWOSPWOSPAPP As wospwoapp,
     
    RemoveIf('Work Order Spare Parts Work Order Spare Part Approvals',ID=wospwoapp.ID);
     
    );
     
    ForAll(varWOSP As wosp,
     
    RemoveIf('Work Orders Spare Parts',ID=wosp.ID);
     
    );Notify(
        "Deleted successfully",
        NotificationType.Success
    ););
     
    UpdateContext({showPopup: false});
    Set(selectedID,DashBoardGallery_1.Selected.ID);
    Set(
        selectedID,
        Blank()
    );
    Set(
        varPrintProcessID,
        Blank()
    );
    Set(
        varPrintProcessPrintOrder,
        Blank()
    );
    Set(
        varPostingUnPotingProcess,
        Blank()
    );
    Set(
        varPostingUnPotingProcessPostingUnPostingForms,
        Blank()
    );
     
     
     
    and the error i am getting on the first semicolon:-
     


    and here is the error when i hoverver it:-



    also despite this error the code is working on Test and partially working on PROD.. so the error is somehow misleading...

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard