Skip to main content

Notifications

Community site session details

Community site session details

Session Id : fhLl9LH6yfi+NSDzd2chd5
Power Apps - Building Power Apps
Unanswered

Creating Multiple-select input for Canvas form in Powerapps

Like (1) ShareShare
ReportReport
Posted on 23 Jul 2024 18:44:53 by 107
Good afternoon all, This is my first post to this forum, I have been struggling to find a solution to my roadblock in creating a Powerapps set up to help one of our departments manage change points on non-perishable tooling. 
 
Quick rundown - I am stuck trying to create a Multiple choice selection gallery to complete the data input requirements i want the user to complete (i have not made any fields "required" yet)
 
I have 1 Powerapps table called Table_Dies where the important columns are "Product" and "DieNum" 
I have another Powerapps table called Table_ECI where i have an autonumber field for an ID column, Product as another column, several date fields and a Multichoice column called "Dies_Selected"
 
i set up a Many to Many relationship between both tables. because any die can have many ECIs and any ECI will have Many dies. 
 
here is where I am not sure on if I am executing the correct Strategy. i created an app based on the Table_ECIs (pictured below) and for the field to select dies. I absolutely can not get anything to work. in example below I have a Gallery that i inserted into the Dies_selected Datacard and set the Items to 'Filter(Table_Dies, Product = Datacardvalue9.Selectedtext.value) and the checkboxes Text is set to Thisitem.Dienum.
 
Right now i can click the check boxes and it will submit the form but it doesnt save what i selected to the table. 
 
because the gallery is set to Table_Dies since when the user selects the product in this form i want the Die_Selected to only show the die numbers that apply to that product. 
 
Then I want them to select the check boxes they want to apply the change point they are registering before submitting form
I want those selections to get written to the multichoice column of the Table_ECI folder
 
The Next thing is After I submit the form this information will also go to a 3rd table to monitor the status of completed of each individual die for each ECI. 
so the 3rd table would essentially look like ECI ID listed multiple times in as many rows as Dies_Selected and the user has to fill in the separate tracking Date columns as those get completed so that we have record of exactly when each die was done and which die is left to be completed. 
 
I apologize if I did not provide enough Property information, Please let me know if you I need to provide any specific Field property data. 
 
 
 
 
Categories:
  • CP-23071818-0 Profile Picture
    107 on 24 Jul 2024 at 18:46:05
    Creating Multiple-select input for Canvas form in Powerapps
    If I am reading my settings correctly I have Modern controls turned OFF
    Check box 1 properties (this is the only  Check box i have in the whole app)
    OnCheck - 
    Relate(RecordsGallery1.Selected.ECI_ID, ThisItem)
     
    On Uncheck - 
    Unrelate(RecordsGallery1.Selected.ECI_ID, ThisItem)
     
    Default 
     
    ThisItem.ECI_ID In RecordsGallery1.Selected.Table_ECI.ECI_ID
     
    "Under the assumption that RecordsGallery1 is populated by Table_ECI and Gallery2 is populated with:"  You are correct.
     
    but !!! i changed the Relate / UnRelate and Default to what you put down in your post and The gallery is behaving as i was expecting it to!!  when i checked boxes stay checked where I had them as i navigate through even when the product changes! 
     
    So my final loose end tie up is now that this check box gallery is behaving like i want it to. could you provide a little more detail on how to use this info to create the records i need to populate for an ECI_Dies table that i already have which i want to include Product / Content/ ECI_Level and these selected dies with the added date columns? 
     
    would I use a Collection function for this? 
     
  • CU12082001-0 Profile Picture
    on 24 Jul 2024 at 17:09:39
    Creating Multiple-select input for Canvas form in Powerapps
    I should have confirmed this, but are you using modern or classic controls? Could you share with me the OnCheck, OnUncheck, and Default (or 'Selected' if using modern controls) properties for the check box in your gallery?
     
    Looking at your Relate function, I think I might see an error. Under the assumption that RecordsGallery1 is populated by Table_ECI and Gallery2 is populated with:
    Filter(
        Table_Dies,
        Product = RecordsGallery1.Selected.Product
    )
     
    Then your Relate function should be:
    Relate(
        RecordsGallery1.Selected.Table_Dies,
        ThisItem
    )
     
    Again, you should see the M:N relationship column suggested to you when typing the '.' after Selected. Your Default/Checked property should look something like this:
    ThisItem.[Unique Identifier Column Name] in RecordsGallery1.Selected.Table_Dies.[Unique Identifier Column Name]
     
    You'll have to check your Dataverse table for the Unique Identifier column name. It has an icon like this:  and should have the following description: "Unique identifier for entity instances". 
  • CP-23071818-0 Profile Picture
    107 on 24 Jul 2024 at 16:06:40
    Creating Multiple-select input for Canvas form in Powerapps
    Well shoot I was going to edit my response but you got to it first, Relate function in OnCheck property will not work 
     
    right now Oncheck in Checkbox in the Gallery2 - Relate(RecordsGallery1.Selected.ECI_ID, ThisItem) tells me that first argument needs to refer to a To many relationship (I dont understand how that doesnt exist when I have a M2M relationship set up in the Relationships lists.) but maybe im using the wrong field to relate with? 
     
    Yes i believe your understanding is correct if by different screen you mean a different App and yes a non editable gallery but each of those gallery items would have 4 date columns i need to fill out and a yes no field for "Complete" (or needing those means i need it to be editable?)
  • Suggested answer
    CU12082001-0 Profile Picture
    on 24 Jul 2024 at 15:55:58
    Creating Multiple-select input for Canvas form in Powerapps
    Hopefully I'm understanding this correctly, but it sounds like (on a different screen) you want to display in a non-editable gallery all the dies which are related to a given record in the ECI table. This is actually fairly easy to do. If you had two galleries, and one was populated by the ECI table (let's call it RecordsGallery1), then for Gallery2 simply set the item property to RecordsGallery1.Selected.Table_Dies
     
    This relies on the M:N relationships you set up using the check boxes. Also keep in mind that "Table_Dies" at the end of that item property should be the plural name of the table at the other end of your M:N relationship. You should see it as an option in the IntelliSense list after typing the '.' after 'Selected'.
  • CP-23071818-0 Profile Picture
    107 on 24 Jul 2024 at 15:30:52
    Creating Multiple-select input for Canvas form in Powerapps
    OK! changing where DataCardValue9.SelectedText.Value to RecordsGallery1.Selected.Product Produced an Error free Checkbox gallery list.
     
    if I could ask for your Continued support and direction - So I understand how using Relate and Unrelate will Recall the Check marks and change their status based on the record.
     
    however if this is only tied to a gallery that has no Update/Append functionality so How would I Pass these selections down so the next table?
     
    I would need to then use a Collection on Submitform button? to pass these selections to the next Table&App that i plan to use to keep track of the dates when individual steps needed to complete the work on the dies 
     
    or Do you suggest another method 
  • CP-23071818-0 Profile Picture
    107 on 24 Jul 2024 at 15:14:53
    Creating Multiple-select input for Canvas form in Powerapps
    I did in fact use that very video in one of my iterations in trying to complete this task!
     
    I had a problem where if i used = vs In comparing Product where i originally was using Datavaluecard9.Selectedtext.value which was the Product field in the Form (form1) in Table_ECI being displayed in the form but i never thought to use the gallery itself (which in the form is called RecordsGallery1)
     
    but when i used = it would not show ANY values in the gallery but in the instructions of the Items field where you can preview the table data the filter worked correctly. OR if i used In it would present all the check boxes with thier labels correctly but i got Delegation error. 
     
    I will try using Product = Gallery.SelectedItem and see how that works! 
  • Suggested answer
    CU12082001-0 Profile Picture
    on 24 Jul 2024 at 13:36:01
    Creating Multiple-select input for Canvas form in Powerapps
    Take a look at this video by Pragmatic Works which explains how to define M:N relationships in Power Apps: Intro to Many to Many Relationships in Canvas Apps: A Beginner's Guide (youtube.com). I've struggled with this same requirement. I think you'll find that embedding a gallery in a data card introduces its own set of issues. It is not recommended.
     
    In your case, I think the video perfectly describes a setup you can use. It would eliminate the need for the Dies_Selected multi choice field. In short, Gallery 1's data source is Table_ECI, and Gallery2's data source (has to be outside the form, if a form is even needed) is Table_Dies, filtered by items where Product in that table is equal to Product on Gallery1.SelectedItem. Then, set up the check boxes' default values and configure them to perform the Relate() functions.
     
    IntelliSense will not always complete the M:N columns, but I think that's pointed out in the video. Let me know how that goes.
  • CP-23071818-0 Profile Picture
    107 on 24 Jul 2024 at 12:45:11
    Creating Multiple-select input for Canvas form in Powerapps
    JacobKing,
     
    All data is being stored in Dataverse not Sharepoint at this moment. a part of me is thinking if that is where I went wrong.  atleast I believe this is what would be considered Dataverse (i have only been working with Powerapps for a couple months so im still learning) 
     
  • CU12082001-0 Profile Picture
    on 23 Jul 2024 at 19:33:25
    Creating Multiple-select input for Canvas form in Powerapps
    Where is this data being stored? Dataverse?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 106 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 73

#3
stampcoin Profile Picture

stampcoin 52

Overall leaderboard