I have made a Canvas app that needs to maintain data in a table in SQL Server. I have bound the contents of a SQL view to a Gallery.
It looks like this:
When I click the green icon in the last line I would like to insert a row in a table with the typed-in values.
My formula looks like this:
Set(Var_SelectedRecord, ThisItem);
Set(Var_AssignmentId, GUID(Var_SelectedRecord.AssignmentId));
Patch('Custom.AssignmentRates', Defaults('Custom.AssignmentRates'),
{AssignmentId: GUID(Var_SelectedRecord.AssignmentId)},
{HourlyRate: 125},
{Currency:txtCurrency.Text },
{Id: GUID()});
Refresh('Custom.vProjectOverview');
This works fine 🙂.
The reason the "HourlyRate" is set to 125 is that I cannot figure out how to use the actual value in input field (it is called txtRate). If I replace 125 with
{HourlyRate: txtRate.Text},
I get this error:
If I try to cast it to e.g. a number, I get this error.
The question is ofc - how can I use the typed-in value from this input field in my formula?
Note: The "Format type" of the input field txtRate in question is "Number".

Report
All responses (
Answers (