Do you mean that you add a Gallery control within a Custom Data card of your Edit form control?
Further, do you want to change the data source the custom data card connects to?
Galleries inside data forms have never been supported - if you try to insert one gallery inside a form (via the Insert menu), then it will not be added inside the form, but outside of it instead. The fact that you can copy a gallery from outside the form and paste it inside is a bug that may be fixed in the future.
The user @ericonline has faced similar issue with you, please check the response within the following thread:
I suppose that you copy a gallery from outside the form and paste it inside a custom data card, is it true?
If you only want to change the data source the custom data card connects to in your Edit form within PowerApps I afraid that there is no way to achieve your needs currently.
Actually, if you copied a gallery from outside the form and paste it inside a custom data card, you could display the records within the embedded Gallery directly. Displaying data within embedded Gallery is not dependent on the custom data card.
I have made a test on my side, please take a try with the following workaround:
Set the OnVisible property of the first screen of your app to following formula:
ClearCollect(RecordsCollection, 'YourOtherDataSource') /* <-- 'YourOtherDataSource' represents the data source you want to display within the embedded Gallery in your custom data card */
Set the Items property of the embedded Gallery within custom data card in your Edit form to following:
Community Support Team _ Kris Dai If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.