Hi everyone,
I've been trying variations of this formula all morning, but haven't gotten where I needed to.
I have two SQL tables connected to two galleries, one gallery on one screen, and the other on a second screen.
When I click on the delete button currently, it deletes only the selected item from that gallery. Normal. And this it the formula:
Remove(SQLTable1, WatchScreenGall.Selected);
However, I've tried using if conditions, and RemoveIf, such as the following formulas, but nothing is coming of it. Which makes me wonder if two one records from two different tables can be deleted with on button?
Remove(SQLTable1, WatchScreenGall.Selected);
RemoveIf(SQLTable2, Subtitle2.Text = WatchScreenGall.Selected.Subtitle1)
Any thoughts?
Thanks in advance
W
Solved! Go to Solution.
I would try something like this, as it's possibly the case that WatchScreenGall.Selected.Subtitle1 isn't accessible following the removal of the parent record:
With({subtitle:WatchScreenGall.Selected.Subtitle1},
Remove(SQLTable1, WatchScreenGall.Selected);
RemoveIf(SQLTable2, Subtitle2 = subtitle)
)
I'd also check the filter condition of your call to RemoveIf, to make sure it refers to a column name. I assume the column name you want to match is Subtitle2, rather than Subtitle2.Text?
I would try something like this, as it's possibly the case that WatchScreenGall.Selected.Subtitle1 isn't accessible following the removal of the parent record:
With({subtitle:WatchScreenGall.Selected.Subtitle1},
Remove(SQLTable1, WatchScreenGall.Selected);
RemoveIf(SQLTable2, Subtitle2 = subtitle)
)
I'd also check the filter condition of your call to RemoveIf, to make sure it refers to a column name. I assume the column name you want to match is Subtitle2, rather than Subtitle2.Text?
Hi @timl!
Thanks for responding!
So the column name was actually also Subtitle1. However previously, I was targeting the .Text element, as if it were some ID of sorts 🙄.
Anyway, that formula has worked a treat!
Thanks so much!
W
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
208 | |
97 | |
60 | |
53 | |
51 |
User | Count |
---|---|
255 | |
158 | |
87 | |
79 | |
65 |