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 / How to remove a record...
Power Apps
Answered

How to remove a record for a table inside a collection

(0) ShareShare
ReportReport
Posted on by 29

Hello,

 

I have a table in a collection. I need to remove a record a that table. Any ideas ?

Categories:
I have the same question (0)
  • AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    You can use the Remove function or RemoveIf function where applicable. 

    do you have some screenshots or details of the Power Fx Formula you are using?

     

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-remove-removeif 

  • FlorentGiboin Profile Picture
    29 on at

    Ok, I know how to remove works but :
    In know the Remove function ^^

    Remove(
    lookup(Collection,id=1).myTable, //I select the collection record and table where I want to remove a record
    ....... // How to remove now ?



  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @FlorentGiboin,

     

    Did you solve your issue? 

  • v-bofeng-msft Profile Picture
    on at

    Hi @FlorentGiboin :

      Do you want to remove the record whose id is 1 from the collection? If so, please try:
      

    RemoveIf(Collection,id=1)

     

      Best Regards,

      Bof

  • FlorentGiboin Profile Picture
    29 on at

    I want to remove a record of a table INSIDE a collection. Not remove a record of a collection.

  • v-bofeng-msft Profile Picture
    on at

    Hi @FlorentGiboin :

    Is it possible to provide the data structure of the data source? Is it possible to provide a demo?

    Could you describe in detail the rules for deletion?
    Best Regards,

    Bof

  • FlorentGiboin Profile Picture
    29 on at
    ClearCollect(tempTableText,{_alpha:"",_beta:"",_delta:"",_epsilon:"",_gamma:"",_lambad:"",_mu:"",_zeta:""});Clear(tempTableText);
    ClearCollect(tempParams,{id:0,Input:"",inputDisplay:"",ShortName:"",Name:""});
    Clear(tempParams);
    ClearCollect(vFormMass,AddColumns(
    SortByColumns(Filter(ChoiceForms,Requestable.Name=vRequested),"dp_order",Ascending)
    ,"input",""
    ,"inputDisplay",""
    ,"inputPicker2",tempPerson2
    //,"inputPickers2",tempMultiplePicker
    ,"inputTable",tempTableText
    ,"myToggle",false
    ,"isVisible",If(IsBlank(ThisRecord.ParentTagOrder),true,false)
    ,"isValid",If(!IsBlank(ThisRecord.isOptional),false,true)
    ,"isSaved",false
    ,"inputParams",tempParams
    ) // End AddColumns
    ); // End Collect

    How to do a remove in vFormMass a record of inputTable ?

  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @FlorentGiboin :

     

        Do you want to remove a record in the table type field inputTable of a specific record in vFormMass?If so , there is currently no such an OOB function to achieve this requirement. But there is a work around:

     

        First find the inputTable in the specified record, filter it and save it to a temporary variable, and then overwrite the original inputTable value with this new value

     

        I assume you want o delete the record whose id=1 in inputTable  of the first record in vFormMass.

     

    With(
     {NewTable:Filter(First(vFormMass).inputTable,id <> 1)},
     Patch(vFormMass,First(vFormMass),{inputTable:NewTable})
    )

     

      Best Regards,

      Bof

  • FlorentGiboin Profile Picture
    29 on at

    I was using a temporary table but can play with collect in a ForAll, but why I didn't think to use a WITH as you proposed !!!!! 

    Thank you !

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