Hi i'm going mad using combox, i read a lot of stuff but nothing worked
i have an edit form in which i modify my applicants, the combobox is used to insert the current company
so i have two data sources in sharepoint (applicants and companies)
when i try to set item of this combobox i used distinct formula, or even Table.column
the only thing that works is the "table.column", the distinct formula do not find record
the formula i use to update data card (combobox.selected.Idposition) do not work, it can't find "idcompany" that is the id for the company table
when i open "fields" in combobox, i can't see any datasource on top, even if i selected the correct table when i created the combobox
can someone give me an advice on combobox with sharepoint list?
Solved! Go to Solution.
Hi @diego_marino ,
Have you changed the Azienda column in your SP list?
Please consider save your SP List into a Collection, then check which text string the 'Azienda' column header has been rederened as.
In addition, you could also consider go to "List Settings" of your SP list, then click the 'Azienda' column within the Columns part, then within the URL box, check if the internal name is the same as that you used in your app:
Note: Within PowerApps app, it would use internal name of columns of a SP list as column name.
Then within your app, please use the internal name of the 'Azienda' column within above ShowColumns function.
Best regards,
Hi @diegomarino
HI @diegomarino ,
Which type column do you use within your applicants list to store the selected value within the Company ComboBox? Choice type column or LookUp type column?
Based on the formula you provided, I think there is something wrong with it. The result the Table.ColumnName formula returns could only contain the ColumnName column value, it could not contain any other column value.
Based on the needs that you mentioned, I think the ShowColumns function could achieve your needs. Please consider set the Items property of the Company ComboBox to following:
ShowColumns('Companies List', "ID", "CompanyName")
Note: The CompanyName represents the column in your Companies list, which you want to use as the display value within the ComboBox.
Then you could reference the ID column value from the selected item in Company ComboBox as below:
ComboBox1.Selected.ID
In addition, if you want to update the selected company value back to your applicants list, please take a try with the following workaround:
1. If you use Single Text type column to store the selected company value:
Set the Update property of the Company Data card in your Edit form to following:
CompanyComboBox1.Selected.ID
2. If you use Choice Type column to store the selected company value:
Set the Update property of the Company Data card in your Edit form to following:
{
Value: CompanyComboBox1.Selected.ID /* <-- or type CompanyComboBox1.Selected.CompanyName */
}
3. If you use LookUp type column to store the selected company value:
Set the Update property of the Company Data card in your Edit form to following:
{
Id: CompanyComboBox1.Selected.ID,
Value: CompanyComboBox1.Selected.CompanyName
}
Please take a try with above solution, then check if the issue is solved.
Best regards,
thanks both for the good answers given, and for the time spent
i tried some solution, the formulas were good (well, i used them more or less before) but the real problem is that i can't get the value i want.
ShowColumns('Companies List', "ID", "CompanyName")
i'm in the "applicants" list, i have a form in which i display every field of it
to store the company of an applicant i use the ID of another list, the "companies" one, as you know.
now, i delete the textbox related to the CompaniID (the foreign key) and i put a combobox
i use the formula you posted before and it's good till i reach the last value, the "companyName"
Showcolumns(Companies;IDcompany;Company)
i can't get the last value, "company", that's the value i want to show but it's not available.
this happens to every other lists i have in my application. It's clear i make some mistake, but i do not know which one
Everything should be ok if i can get the last value of the formula (in this case "company" that's the sharepoint name), but it says that the column name is not valid or something similar.
Thanks, i hope you can help me on that
Hi @diegomarino ,
Could you please share a bit more about the 'Company' column in your 'Company List'? Is it a Text type column or a Choice type columns?
You could only specify Text type column from your SP List within ShowColumns function. If the 'Company' column is a Complex type column (e.g. Choice type column), you could not specify it within your ShowColumns function.
If the 'Company' column in your 'Company List' is a Text type column, I think the formula I provided above could achieve your needs:
ShowColumns(Companies; "ID"; "Company")
If the 'Company' column in your 'Company List' is a Choice type column, please consider modify above formula as below:
ShowColumns(
AddColumns(Companies; "CompanyValue", Company.Value); /* <-- The Company represents the Company column in your Companies list */
"ID"; "CompanyValue"
)
Please take a try with above solution, check if the issue is solved.
Best regards,
hi the "companyname" column is a single line text....
i tried
ShowColumns(Aziende;"ID";"Azienda")
ShowColumns(Aziende;"IDazienda";"Azienda")
("azienda" means "company" and "aziende" is "companies")
"IDazienda" is the name of my id columns for the list
The problem is that the last argument "azienda" do not exists, but it is in my sharepoint list and it's a text column
Hi @diego_marino ,
Have you changed the Azienda column in your SP list?
Please consider save your SP List into a Collection, then check which text string the 'Azienda' column header has been rederened as.
In addition, you could also consider go to "List Settings" of your SP list, then click the 'Azienda' column within the Columns part, then within the URL box, check if the internal name is the same as that you used in your app:
Note: Within PowerApps app, it would use internal name of columns of a SP list as column name.
Then within your app, please use the internal name of the 'Azienda' column within above ShowColumns function.
Best regards,
I can't believe i loose all this time for that stupid error
it was just like you said
just other two question
1) may i change the internal name of a column in sp list?
2) for "default value" i used "LookUp(Aziende;IDazienda=AziendaID;Azienda)" or "LookUp(Aziende;IDazienda=AziendaID;"title")" but it says that a value "record" is required
how can i set the default value?
i used {Value:LookUp(Aziende;ThisItem.AziendaID=IDazienda;Azienda)} it works
Hey @diego_marino / @diegomarino
Glad that you were able to resolve. If your issue is solved, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
201 | |
184 | |
69 | |
39 | |
34 |
User | Count |
---|---|
349 | |
271 | |
124 | |
78 | |
61 |