cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
omh
Level: Powered On

There was a problem saving your changes. The data source may be invalid. - when adding record in a table which has trigger

Good day,

 

I have added a trigger on insert/update for two fields and now I am getting the above error when adding a record in the table from the Power Apps form.  Is there any way to make the power apps form work when having a trigger on the table?

 

Thank you.

 

7 REPLIES 7
Community Support Team
Community Support Team

Re: There was a problem saving your changes. The data source may be invalid. - when adding record in a table which has trigger

Hi @omh ,

Could you show me your formulas and screenshoots?

The reason of  "The data source may be invalid" may be many possibilities.

Please check whether you have connect with your data source successfully.

Try to refresh your data source.

You could check it here:

7269.PNG

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
omh
Level: Powered On

Re: There was a problem saving your changes. The data source may be invalid. - when adding record in a table which has trigger

Hello @v-yutliu-msft ,

 

From what I read in an older post, Power Apps SQL Connector does not allow triggers. The data connection is successful but I cannot save the form. I have attached print screens with the data connections and the error message. 

If I remove the trigger everything works fine.  I have tried obtaining the same by using  functions and making the fields computed, but I also get an error ( attached) . Is there any limitation  when having computed columns in the table? ( the computed columns are calculated based on SQL join)

 

Thank you,

omh
Level: Powered On

Re: There was a problem saving your changes. The data source may be invalid. - when adding record in a table which has trigger

I am also adding the print screen with the error message which appears in the Save Form.

Community Support Team
Community Support Team

Re: There was a problem saving your changes. The data source may be invalid. - when adding record in a table which has trigger

Hi @omh ,

I'm afraid it''s not supported to use SQL calculated field in PowerApps currently.

Some one has posted a similar idea, you could vote for him:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/SQL-Output-Clause-error-on-calculated-column/idi...

I suggest you do calculation inside PowerApps, here's a doc about it for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/define-calculated-fields

 

Best regards,

Community Support Team _ Phoebe Liu

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
omh
Level: Powered On

Re: There was a problem saving your changes. The data source may be invalid. - when adding record in a table which has trigger

Thank you for your answer, @v-yutliu-msft . I was thinking that maybe this could be a solution for the triggers :), but it seems it isn't.

omh
Level: Powered On

Re: There was a problem saving your changes. The data source may be invalid. - when adding record in a table which has trigger

@v-yutliu-msft the curious thing about this is that in the SQL table I have another computed column, which has the formula Column1  AS (CONVERT([nvarchar](50),[Column2])) and this column raises no issues when saving data. Could there be an issue only with the functions?

Community Support Team
Community Support Team

Re: There was a problem saving your changes. The data source may be invalid. - when adding record in a table which has trigger

Hi @omh ,

Please check the doc the last part :

(You should be aware of certain conditions and limitations when working with calculated fields:)

https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/define-calculated-fields

The formula works may not beyond the limits.

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,539)