Hi, could you help me with an issue...
I'm building an app where I'm gathering data from COMBO BOXES and after clicking a button I want to update row in the esxel fine on One Drive. The thing is that there is a multiple selection available in those combo boxes, but when I hit the button - only one of selected answers is recorded in excel file. For example I have selected codes: 1234;5678;98765 and only the last one after semicolon will be sent to excel. Is there a way to fix this and send all selected to the excel file? It's important to keep it this ways as this app is also sending an email with such table written in HTML and those should look pretty similar. In the attachment sending the email and excel tabe (on yellow marked where two codes should be, but there is one only).
//Because as I understand - it is not possible to create rows as in the email right? //
Solved! Go to Solution.
@Mickow Try this code,
Patch(
Table4PowAu,
Defaults(Table4PowAu),
{xCode : xCode.Selected.x0020_Code_x0020_ID,
xCode_1 : xCode_1.Selected.x0020_Code_x0020_ID,
Country : Concat(Country.SelectedItems, Value, ";"),
DueDate : Text(
DueDate.SelectedDate, "dd/mm/yyyy"
),
Urgent : If(
Checkbox1.Value = true, "Yes", "No"
),
Notes : AddNote.Text,
SubmittersName : User().FullName,
SubmittersEmail : User().Email}
)
In your code to submit data to excel. Use ComboBox.SelectedItems instead of ComboBox.Selected
What is your formula you are using to submit the values to Excel?
Can you explain what you mean by Rows in an Email?
Hi, well... when I'm simply changing from Selected to SelectedItems I get an error that the argument does not meet the expected type "Text"...
@RandyHayes This is my code:
Patch(Table4PowAu,
Defaults(Table4PowAu),
{xCode:xCode.Selected.x0020_Code_x0020_ID,
xCode_1:xCode_1.Selected.x0020_Code_x0020_ID,
Country:Country.Selected.CountryCode,
DueDate:Text(DueDate.SelectedDate,"dd/mm/yyyy"),
Urgent:If(Checkbox1.Value=true,"Yes","No"),
Notes: AddNote.Text,
SubmittersName:User().FullName,
SubmittersEmail:User().Email}
And what I mean in the backslashed sentence is that as I assume it is not possible to add with PowerApps in the excel sheet multiple (3 in my case) rows at the same time. I can add just one row with multiple columns, right?
@Mickow Try this code,
Patch(
Table4PowAu,
Defaults(Table4PowAu),
{xCode : xCode.Selected.x0020_Code_x0020_ID,
xCode_1 : xCode_1.Selected.x0020_Code_x0020_ID,
Country : Concat(Country.SelectedItems, Value, ";"),
DueDate : Text(
DueDate.SelectedDate, "dd/mm/yyyy"
),
Urgent : If(
Checkbox1.Value = true, "Yes", "No"
),
Notes : AddNote.Text,
SubmittersName : User().FullName,
SubmittersEmail : User().Email}
)
Just to make it clear to everyone new to PowerApps... "VALUE" in this code will be "CountryCode", because it might suggest that value is some part of the code itself (which makes no sense, but can create a little confusion if you are not a coder).
Thanks 🙂
User | Count |
---|---|
257 | |
110 | |
97 | |
52 | |
39 |