Hi I want to append these below details to excel everytime a new user enters the data
Excel Table which is linked with onedrive is Table1
Columns:
Name/CurrentDate/Required_date/Choice(Drop-down)/Cost/Toggle
Name is column with textInput user name
CurrentDate is today's date
Required date is the date going to be selected by user
Choice is having dropdow
Cost is a value
Toggle is yes/no
I am trying to use patch function for submit button but I am getting syntax errors..
Also it should get submitted only when all the columns are filled else it should not get navigated to next screen.
Can someone help me with the solution.
Thankyou.
Solved! Go to Solution.
I assume that the currentDate is setted already with today and i don't have the control names so try something like this.
If(!IsBlank(NameControl.Text) And !IsBlank(RequiredDatePicker.SelectedDate) And !IsBlank(ChoiceControl.selected.Text) And !IsBlank(Value(CostControl.Text)) And !IsBlank(Toggle.Value),
Patch(Table1,
defaults(Table1),
{
Name : NameControl.Text,
CurrentDate : Today(),
RequiredDate : RequiredDatePicker.SelectedDate,
Choice : ChoiceControl.selected.Text,
Cost : CostControl.Text,
boolColumn : Toggle.Value
}),,
Navigate(Page 2),Notify("You must fill-in all fields", NotifyType.Error))
@Shahin1 At the end of the Patch - before Navigate(.....) you are having 2 commas. Replace that with a semicolon ;
If(!IsEmpty(field1) And !IsEmpty(field2).....;
Patch(ExcelTable; Defaults(ExcelTable); {Column 1 : Field 1; Colum 2 : Field 2; ......});;Navigate(Page2); Notify("You must fill-in all field"; NotifyType.Error)
I assume you're in US format so ";" are replaced with ",". I'm using French format.
I assume that the currentDate is setted already with today and i don't have the control names so try something like this.
If(!IsBlank(NameControl.Text) And !IsBlank(RequiredDatePicker.SelectedDate) And !IsBlank(ChoiceControl.selected.Text) And !IsBlank(Value(CostControl.Text)) And !IsBlank(Toggle.Value),
Patch(Table1,
defaults(Table1),
{
Name : NameControl.Text,
CurrentDate : Today(),
RequiredDate : RequiredDatePicker.SelectedDate,
Choice : ChoiceControl.selected.Text,
Cost : CostControl.Text,
boolColumn : Toggle.Value
}),,
Navigate(Page 2),Notify("You must fill-in all fields", NotifyType.Error))
It worked if write only till navigate(screen) ... It's throwing error if I write notify as above.. Notify is not working ...
@Shahin1 At the end of the Patch - before Navigate(.....) you are having 2 commas. Replace that with a semicolon ;
I replaced it with single comma it worked
But It's not reflecting in excel sheet?
Hi ... @Anonymous @CNT
Thanks for your formula..
But Data is not getting reflected in Excel sheet ... Excel sheet is not opened .. it's closed .. but still the data is not reflecting in excel sheet ... What might be the error?
And also when I fill all fields and submit .. it's navigating to next screen but screen1 is showing the previous details of which I entered ...( If new user wants to enter the details it shouldnot show previous user details )..
Do I have to change any settings in properties? Can you help me with this..
Thankyou..
User | Count |
---|---|
257 | |
110 | |
90 | |
51 | |
44 |