cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rahul123
Frequent Visitor

Multiple Course selected in sharepoint list, i need to approve individual Course

Hello, 

 

I created a sharepoint list and PowerApp form for school enrolment. student can select and enroll multiple subjects, which will get saved in sharepoint list in one cell with comma seperated. 

Then school admin can approve this courses. The problem I am having is, how school admin can approve 1 course out of 3 courses selected by student?

 

any suggestion how i can achieve this?

 

many thanks 

 

Rahul

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @rahul123 ,

According to the screenshot that you mentioned, I think there is something wrong with it. You should add the "Approve" button and "Reject" button inside the Gallery rather than outside the Gallery.

 

Please check the following GIF screenshot for more details:

Test.gif

 

After that, within your SP List, you could consider add a Choice type column called "Approval Status", with two available options -- Approved & Rejected.

Then back to your canvas app, refresh the SP list data source, then set the OnSelect property of the "Approve" button to following:

Patch(
      'Your SP List',
      LookUp('Your SP List', ID = ThisItem.ID),
      {
        'Approval Status': {
                            Value: "Approved"
                        }
      }
)

set the OnSelect property of the "Reject" button to following:

Patch(
      'Your SP List',
      LookUp('Your SP List', ID = ThisItem.ID),
      {
        'Approval Status': {
                            Value: "Rejected"
                        }
      }
)

 

Please try above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

@rahul123 

Are you saying that when students select courses this is then saved in a single column, something like this

 

StudentName || CoursesColumn

Student X        || Course1, Course 5, Course 6

Student Y        || Course 2, Course 3

...

 

If so, you could

1. Build a separate SP List to store the Approved Courses, or

2. Add another column of Approved Courses, separating these with commas as well

 

Either would work. Happy to help further if needed.

 

v-xida-msft
Community Support
Community Support

Hi @rahul123 ,

Could you please share a bit more about the data structure of your SP List?
Which type column do you use to store the course subjects? Text type column or Choice type column (enabled "Allow Multiple Selections")?

 

I assume that you used a Choice type column (enabled "Allow Multiple Selections") to store the course subjects. If you want to approve individual Course of selected courses in Choice type column, please consider try the following workaround:

Add a Gallery (CourseGallery) in your app screen, set the Items property to following:

BrowseGallery1.Selected.CourseChoiceField

within this Gallery, add a Label control, set the Text property to following:

ThisItem.Value

Note: The BrowseGallery1 represents the Gallery in your app which list all available records from your SP List.

Within the CourseGallery, add a two buttons/icons -- "Approve" or "Reject". Set the OnSelect property of the "Approve" or "Reject" button to corresponding execution formula, which would do corresponding operation when you press the "Approve" or "Reject" button in each item of this CourseGallery.

 

Please consider take a try with above solution, check if it could help in your scenario.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

thank you Kris for your suggestion.

by creating gallery, will the subject will appear as a separate choice for approve or reject? This gallery will be visible on separate screen for school admin to make a choice?

how that will going to reflect in SP list ?

*some more information regarding my work..

rahul123_0-1593654574281.png

rahul123_1-1593654663081.png

 

 

 

 

hello Kris

based on your suggestions, i created gallery 

i want to give choice  for approve and reject for individual course. 

rahul123_0-1593658686181.png

rahul123_2-1593658911729.png

subjects can be 1 to 4.

 

how this will look in SP list? i how i can setup approval column in SPlist?

 

kind regards

Rahul

 

 

 

Hi @rahul123 ,

According to the screenshot that you mentioned, I think there is something wrong with it. You should add the "Approve" button and "Reject" button inside the Gallery rather than outside the Gallery.

 

Please check the following GIF screenshot for more details:

Test.gif

 

After that, within your SP List, you could consider add a Choice type column called "Approval Status", with two available options -- Approved & Rejected.

Then back to your canvas app, refresh the SP list data source, then set the OnSelect property of the "Approve" button to following:

Patch(
      'Your SP List',
      LookUp('Your SP List', ID = ThisItem.ID),
      {
        'Approval Status': {
                            Value: "Approved"
                        }
      }
)

set the OnSelect property of the "Reject" button to following:

Patch(
      'Your SP List',
      LookUp('Your SP List', ID = ThisItem.ID),
      {
        'Approval Status': {
                            Value: "Rejected"
                        }
      }
)

 

Please try above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

thank you for your reply, actually still getting some errors

 

rahul123_0-1594091059303.png

 

Hi @rahul123 ,

Firstly, you need to create a separated SP List (called 'Approval History', including 'Course Name', ItemID, ApproveDate, ApproverName, ApprovalStatus columns)to store the approval result for each individual course item.

 

Please set the Items property of the Course Gallery to following:

AddColumns(
           BrowseGallery1.Selected.'In which ViSN Course(s) is the student requesting enrolment?',
           "ItemID",
           BrowseGallery1.Selected.ID
)

 

Please make sure you have add the "Approve" button and "Reject" button inside the Course Gallery rather than outside the Gallery. Set the OnSelect property of the "Approve" button to following:

Patch(
      'Approval History',
      Defaults('Approval History'),
      {
         'Course Name': ThisItem.Value,
         ItemID: ThisItem.ItemID,
         ApproveDate: Today(),
         ApproverName: User().FullName,
         ApprovalStatus: "Approved"
      }
)

Note: The ApprovalStatus column is a Text type column in your 'Approval History' SP List, the ItemID column is used to store the SP List Item ID of the record selected from your BrowseGallery1.

Set the OnSelect property of the "Reject" button to following:

Patch(
      'Approval History',
      Defaults('Approval History'),
      {
         'Course Name': ThisItem.Value,
         ItemID: ThisItem.ItemID,
         ApproveDate: Today(),
         ApproverName: User().FullName,
         ApprovalStatus: "Rejected"
      }
)

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,327)