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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / The record cannot be d...
Power Apps
Unanswered

The record cannot be deleted because it is associated with another record.(How do I hide something in Powerapps dropdown box?)

(0) ShareShare
ReportReport
Posted on by 132

Hello,

I have some product bundles that I had to clone in order to be able to remove old products and add new ones to them. However now that I have added the new products, I'm trying to delete the old ones but it won't let me and gives the above error. I understand that it's saying it's associated to something, but it won't tell me what it is. This wouldn't really be a problem except that there's a powerapp used for selling stuff that pulls from the CRM the products. But that powerapp is showing the retired product bundles as well as the new ones and it's making it very messy. \

 

What do I do? The 2022 bundles/products are the ones I made, but as you can see, the list is long and confusing with all the old stuff still showing up. Is there anyway I can at least hide the old bundles/products in powerapps?

'pastedimage1669298906946v1.png

 

Categories:
  • Matren Profile Picture
    454 Super User 2024 Season 1 on at

    Hi @zerou ,

     

    What about trying to filter the dropdown box values by a certain date?

     

    You could place the following code in the dropdown box Items property:

     

    Filter(DataSource,DateColumnName >= Date(2022,8,5))

     

    This would only show items that are greater than or equal to a certain date. The DateColumnName (e.g. Created) could reference the column that shows when the item was created.

     

    Or, you could use another date based formula.

     

    Let me know how it goes.

     

    Best Wishes,

     

    Matren

     

    --------------------------------------------------------------------------------------------

    Find this post helpful, give it a Thumbs Up

    Solved your problem, click Accept as Solution so others can find it

     

  • Tolu_Victor Profile Picture
    197 Super User 2024 Season 1 on at

    Hi
    If all the records you need to show contain "2022". You can use a simple filter using that text

    Filter(Datasource, "2022" in productName)

    Please modify to fit your specs 

  • Matren Profile Picture
    454 Super User 2024 Season 1 on at

    Hi @Tolu_Victor ,

     

    You listed a good suggestion; however, there may be an issue if the year turns to 2023 and there is a need to continue to add items. Of course, you could keep adding 2022 to every item in 2023, but it would be nice to avoid hard coding.

     

    I recommend filtering by a fixed or relative date as listed above. 

     

    Best Wishes,

     

    Matren

     

    --------------------------------------------------------------------------------------------

    Find this post helpful, give it a Thumbs Up

    Solved your problem, click Accept as Solution so others can find it

  • Tolu_Victor Profile Picture
    197 Super User 2024 Season 1 on at

    Another option is to add a simple Number column to store the Year. Then filter where Year is greater or equal to 2022

    Filter(Datasource, Year >= 2022)
  • XeXE Profile Picture
    132 on at

    So if I wanted the dropdown box to only show items created say this month, then I would go:

     

    Filter(DataSource,DateColumnName >= Date(2022,12,01))

    Am I doing that right? I guess my problem is that what happens when new items need to be added or product bundles created? The 2022 was just for my own benefit for testing. I mean if that's the only way to hide the original ones, then I can work with that and keep their names as such. I'm just so frustrated. I loathe Dynamics CRM. 

  • Matren Profile Picture
    454 Super User 2024 Season 1 on at

    Hi @zerou ,

     

    I understand your frustration. The good news is your issue is common and able to be resolved. We just need to determine the filter criteria that works best for your situation.

     

    Filter(DataSource,DateColumnName >= Date(2022,12,01))

     

    For this formula, you will need to plug in the name of your DataSource and the name of the column that has the creation date for the record.

     

    The filter will show all records which were created on or after Dec 1, 2022. Is there a specific time period which will indicate new vs. old items?

     

    It really depends on the filter criteria that you wish to use. It depends on how you wish to distinguish old vs. new items. Will you do it by time created (e.g. creation date) or by a certain value in a column (e.g. "Old", "New", "Active", "Current", Year, Year/Month, etc.). If you choose a value, what column will it be located in?

     

    Let me know what you wish to do, and then a filter can be developed.

     

    Also, can you share the code that is in the Items Property for your Drop Down box?

     

    Best Wishes,

     

    Matren

     

    --------------------------------------------------------------------------------------------

    Find this post helpful, give it a Thumbs Up

    Solved your problem, click Accept as Solution so others can find it

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard