cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Unbihexium
Helper III
Helper III

Using ListBox or ComboBox as collection list ?

Hello all

I would like do the following and Im not sure how to achive this or if is even possible:
As you can see in the screenshot, there are fields which can be filled by a user (text input) (green frame)

I would like to press the button (yellwo frame) and add the given inputs to the Listbox or ComboBox below, (dont know which one is the correct)
and reset the fileds for a new input, which will be added to the listbox or combobox as a second entry.

So the idee is, after the user has make his input to the listbox or combobox, he is able to select the entry in the box to make changes afterwards.

If this is possible somehow, the plan is to submit the form to SharePoint list and the Listbox or Combobox should be shown as Rich-Text in th SP-list --> the SP-List is already prepared for this.

is this possible? If yes, I would be thankful for any help.

 

Thanks in advance for any hint
regards

24-08-2020 11-53-59.jpg



3 REPLIES 3
PowerAddict
Super User II
Super User II

To answer your first question: try this as the OnSelect of your button:

Set(varTable, Table({Value: DataCardValue11.Text}, {Value: DataCardValue12.Text}, {Value: DateCardValue13.Text})) 

Then set varTable as the Items property of your combo box (you could also use list box, totally up to your preference). If you also want to clear the data cards set the OnSelect of the button to the follows: 

Set(varTable, Table({Value: DataCardValue11.Text}, {Value: DataCardValue12.Text}, {Value: DateCardValue13.Text})); Reset(DataCardValue11); Reset(DataCardValue12); Reset(DataCardValue13)

 

To patch this value to the SharePoint list, do you want to patch the values selected by the user in the combo box or the values from all the 3 data cards? Also what exactly do you want to use the rich text format for?

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

Good Morning Hardit

Thank you so much for your reply.

That is what I'm looking for! Thank you Sir!
I had to make it like that, to get all DataCardsValues in one row:

Set(varTable;
Table({Value: "Art.Nr: " & DataCardValue11.Text &
" // Bz: " & DataCardValue12.Text &
" // Mg: " & DataCardValue13.Text &
"// Datum: " & TextInput1.Text})) &&
Reset(DataCardValue11) &&
Reset(DataCardValue12) &&
Reset(DataCardValue13) &&
Reset(DataCardValue16)

For the Date I hade to convert it to text with an additional DataCard + TextInput and set the "default property" like:
Text(DataCardValue16.SelectedDate; "[$-de-DE]d. mmmm yyyy") 

So far so good. 
What I could not find out or what I still need is: 
-  to make a secound entry in the list. At the moment the record gets overwritten.
-  to select the made entry in the list, as soon as I have selected I should be able to make corrections of the entry.

25-08-2020 09-35-58.jpg

For the patch to Sharepoint I just need the ListBox not the DataCardValues, I would use "SubmitForm" with a button, I think I can make this working, so no help needed for this.... for now... I hope 🙂 but thanks anyway
--> Also what exactly do you want to use the rich text format for?
= I thought to display the ListBox in SharePoint I need the rich-text?

 

25-08-2020 10-04-20.jpg
Kind regards

Depending on when you want to create a new record, you need to have Defaults() as the 2nd parameter for the Patch function. 

Patch(SharePointList, Defaults(), {Column1: Value1, Column2: Value2})

 

I am not sure I understand displaying a list box in SharePoint. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,043)