im fairly new to Powerapps and im trying to build an App that lets me view, edit, create and delete Entries in a SQL Table.
The way i currently try to do is using a datatable form in powerapps to view and select data und a editForm to edit it, using the submitForm function, which works just fine.
My Problem lies in creating new entries (im using a button with the function newform and then another with submitform for that currently). The thing is, that i have to leave the field empty or not submit it at all, because the guid is generated by the database, but it doesnt work with submitting null because its a key attribute. I also tried writing a view that gives me a new GUID and import that directly to powerapps, but i cant figure out how to use that to set the value in my edit form to that value from the view.
I have been struggling at this for quite a while now and I hope that someone knows a solution.
Hello, sorry for not answering earlier, but i have been occupied on something else this week, but now im back at working on my powerapps.
The guid is generated through a default constraint in the sql datatable which sets the default value to newid().
I have found a workaround for it though, by creating a view that gives a newid(), loading that view into powerapps to a datatable and setting the default value in my edit form to either the value selected in the datable i use for my databse im working on, or if empty (because of the command newform())to the value from the view, which i then refresh to always generate a new guid. it works, but now i have got a different problem with one of the other values that are configured as not null in the datatable, but are not supposed to be inserted and instead filled with default values.