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 / Removing Rows from Dat...
Power Apps
Unanswered

Removing Rows from DataVerse Table

(0) ShareShare
ReportReport
Posted on by 374

Hello, I have built an Apps in the regular, online PowerApps, but due to licensing must now rebuild it in PowerApps for Teams, which is proving incredibly frustrating, as there seems to be a good deal that does not work the same way. One instance I've run into is removing rows from my DataVerse table. This code has always worked fine, but now it is not. Can someone please advise how to go about removing *if* rows works in the Teams variation?

 

Many thanks,

 

//DELETES JOB IF IT ALREADY EXISTS

ForAll(forCastdates,
 RemoveIf(
 Operations_Shift_Schedules,
 crb06_sql_keycolumn = NameIndexTextBox)
)
;
ForAll(forCastdates,
 RemoveIf(
 Operations_Shift_Schedules,
 crb06_sql_jobkeycolumn = JobIndexTextBox,
 crb06_jobabbr <> "V" && crb06_jobabbr <> "T" && crb06_jobabbr <> "S" && crb06_jobabbr <> "B" && crb06_jobabbr <> "O" && crb06_jobabbr <> "SE")
)
;

 

I have the same question (0)
  • Verified answer
    AhmedSalih Profile Picture
    6,678 Moderator on at

    Hello, @kariseightytwo, Try this,

     

    Clear(colToRemove_Operations_Shift_Schedules);
    ForAll(forCastdates,
     Collect(colToRemove_Operations_Shift_Schedules,Filter(
     Operations_Shift_Schedules,
     crb06_sql_keycolumn = NameIndexTextBox))
    );
    Remove(Operations_Shift_Schedules,colToRemove_Operations_Shift_Schedules)
    ;
    Clear(colToRemove_Operations_Shift_Schedules);
    ForAll(forCastdates,
     Collect(colToRemove_Operations_Shift_Schedules,Filter(
     Operations_Shift_Schedules,
     crb06_sql_jobkeycolumn = JobIndexTextBox,
     crb06_jobabbr <> "V" && crb06_jobabbr <> "T" && crb06_jobabbr <> "S" && crb06_jobabbr <> "B" && crb06_jobabbr <> "O" && crb06_jobabbr <> "SE"))
    );
    Remove(Operations_Shift_Schedules,colToRemove_Operations_Shift_Schedules)
    ;

     

     

    If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more.


    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.


    Visit my Blog: www.powerplatformplace.com


     

     

  • kariseightytwo Profile Picture
    374 on at

    I'm so sorry it's taken this long to respond. I've been tied up, but have now had a chance to check your code. Unfortunately it's giving me a network error.

     

    "Error when trying to retrieve data from the network". I've removed and re-added my data source, as well

    kariseightytwo_0-1678458565623.png

     

  • kariseightytwo Profile Picture
    374 on at

    Interesting. I made a change to my code in a different section, and now your code appears to be working. It's still throwing a network error, but now it's not identifying where it's coming from. Not sure how to find that out in Teams PowerApps where there's no logging that I can find.

     

    Anyway, thank you for your help!

  • kariseightytwo Profile Picture
    374 on at

    I stand corrected. It's something to do with your code. When I remove that section of code the button still functions properly.

    I will say, even though it errors, your code does indeed remove the records, so it's perhaps something after that?
    If you have any thoughts or advice I'd really appreciate it.

  • AhmedSalih Profile Picture
    6,678 Moderator on at

    @kariseightytwo, send me a Microsoft Teams invitation to AhmedSalih@powerplatformplace.com. I am available now. Let's take a look.

  • kariseightytwo Profile Picture
    374 on at

    Thank you so much for offering, unfortunately I'm not able to share a view to the confidential data we're looking at. I've been able to narrow down the issue though. The first half of your code pointing to NameIndexTextBox, it's the second half that errors:

    kariseightytwo_1-1678462813521.png

    I'll keep digging

  • AhmedSalih Profile Picture
    6,678 Moderator on at

    @kariseightytwo, that is okay. The filter part is the issue, it seems. I copied your filter. Check the filter independently and see if it is giving an error. For example add a gallery and paste the filter formula to the Items property of the gallery. 

  • kariseightytwo Profile Picture
    374 on at

    A HA!

    We were using the column crb06_jobabbr instead of crb06_sql_jobabbr.

    Works like a charm now. Thank you so much!

  • AhmedSalih Profile Picture
    6,678 Moderator on at

    @kariseightytwo, Perfect, always happy to help 🙂

  • kariseightytwo Profile Picture
    374 on at

    I really hate to be responding to this again. For reasons beyond me, it's not actually removing the rows. It's adding them properly, but not removing them.

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 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard