I am working on teams power app.
I am trying to use the below code but getting error Invalid argument.
Please guide the correction in this code :
Patch(
TablePartsReturnA,
If(gblReturnNewRecord, Defaults(TablePartsReturnA), SearchResultGallery_3.Selected),
{
FormNo: TextBox2.Value,
FormDate: TextBox2_1.Value,
Product: TextBox2_2.Value,
FCNo: TextBox2_3.Value,
FCissueDate: TextBox2_4.Value,
FCTargetDate: TextBox2_5.Value
}
);
Set(gblReturnNewRecord,false);
Hey @MIA27
Please enter date as datepicker1_1.selecteddate or datepicker1_1.selected.date
Was able to fix the column name issue, it was nothing but the space after :
Form: TextBox
To be
FormNo:TextBox
No red color under line was there, but after save button click was the below error
Now stuck with another error
And again all my lines get underline with error
Dear Rogier,
The link situation is different, where the column has been renamed.
As you advised, I went line by line, means deleted all line of patch and started working by one field one by the help of auto selection which comes by its own, below is the image
I selected FormNo, Not type it, so NO error question arises here.
This FormNo Data type is Number.
Then after this selection another , another error is coming up.
Please note in the image by itself the error dialog shows the field name is cr333_formno, type error it shows.
Note : That the number which I will supplying will be number, later, then how come up with the error of this.
Guide me to fix one field the current one and then will be able to line by line.
Regards
Were you hovering over the formula row describing FcNo when this occurred? Then this is the specified column that does not exist.
check out this post of mine to see how to solve that:Unknown Column in SharePoint List
Please LIKE the reply and ACCEPT it as the solution if the answer is what you were looking for.
(to help me grow in community rank and help others find the solution)
I tried, the error is not understood to me. as you advised, on each line and try to obtain the error indicator, found the below on each line:
Error : the specified column "_" does not exist.
For example
FcNo is the column header name in the table
FCissueDate is the column header name in the table
and so on.
Below is the images I have taken from table screen, which shown the correct name mentioned :
Can you guide how to be cross checked further,
Please repeat the same procedure until you run out of errors:
- hover over all of the rows in your formula
- wait until it changes the feedback to a specific error
- correct that error
>repeat 🙂
Dear,
As guided by all of your, I have changed the controls and had matched with the data type of the table.
Please review my last post with error and full code and guide me for the correction
Regards
Dear Mr. Himanshu,
please find reply posted having still the error in details, I change the fields according to the table column data type,
Still the error.
Please review and guide
Dear Mr. Rogier,
Noted and change all the Input field on the screen according to the Table. (I mean if table column is Date Field Type, the I selected Date picker for data entry.
so revised the code as below , but still getting the error of invalid arguments:
Patch(
TablePartsReturnA,
If(gblReturnNewRecord, Defaults(TablePartsReturnA), SearchResultGallery_3.Selected),
{
FormNo: TextBox2.Value,
FormDate: DatePicker1.Value,
Product: ComboBox1.Selected,
FCNo: TextBox2_3.Value,
FCissueDate: DatePicker1_1.Value,
FCTargetDate: DatePicker1_2.Value,
}
);
Set(gblReturnNewRecord,false);
Kindly review my code, now what the mistake, as I fixed with the data type and cross checked all.
Please guide
It's hard to determine what could be your issue based on the info you provided. Is everything a text field? You can narrow down where the issue is by removing fields to find which one is causing the issue. My guess would be your date field could be the problem, but if you are updating a text field than what you are doing would work. If the data source has choice fields, your approach wouldn't work for that field type. Once you figure out which field is the problem, identify a data type mismatch and adjust the syntax to provide the right info to the data source.
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional