cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Galina73
Helper V
Helper V

Need to select approvers depending on the information in gallery

Please, help me. I have a gallery . There are two fields in this gallery- recommended discount and requested discount, and if the second one exceeds the first one, the third field "Approval" is filled with text "Approval is required". Depending on this information i need to select an approver. If field is blank- no approver needed, if "Approval required"- need to take approver from SP list. Please, advise, how to fix this task.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @Galina73 ,

Do you want to fill in the third field based on the first two fields, and if the third field display "Approval is required", you need to choose Approval for this item?

 

I've made a similar test for your reference:

1)insert a gallery, display two fields: recommended discount and requested discount

2)insert a label inside the gallery, set the label's Text:

If(ThisItem.'recommended discount '<ThisItem.'requested discount',"Approval required","")

3)insert a combo box inside the gallery to choose approver (approver is a person field in my list)

Set the combo box's Visible:

If(Label1.Text="Approval required",true,false)

Set the combo box's Items:

Choices(test1031.approver)

//test1031 is my list name, you could replace it

4)insert a button inside the gallery to submit the data of Approval and approver field.

Set the button's OnSelect:

Patch(test1031,ThisItem,{Approval:Label1.Text,approver:ComboBox1.Selected})
//if approver is a single person field
Patch(test1031,ThisItem,{Approval:Label1.Text,approver:ComboBox1.SelectedItems})
//if approver is a multiple person field

10316.PNG

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

1 REPLY 1
v-yutliu-msft
Community Support
Community Support

Hi @Galina73 ,

Do you want to fill in the third field based on the first two fields, and if the third field display "Approval is required", you need to choose Approval for this item?

 

I've made a similar test for your reference:

1)insert a gallery, display two fields: recommended discount and requested discount

2)insert a label inside the gallery, set the label's Text:

If(ThisItem.'recommended discount '<ThisItem.'requested discount',"Approval required","")

3)insert a combo box inside the gallery to choose approver (approver is a person field in my list)

Set the combo box's Visible:

If(Label1.Text="Approval required",true,false)

Set the combo box's Items:

Choices(test1031.approver)

//test1031 is my list name, you could replace it

4)insert a button inside the gallery to submit the data of Approval and approver field.

Set the button's OnSelect:

Patch(test1031,ThisItem,{Approval:Label1.Text,approver:ComboBox1.Selected})
//if approver is a single person field
Patch(test1031,ThisItem,{Approval:Label1.Text,approver:ComboBox1.SelectedItems})
//if approver is a multiple person field

10316.PNG

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,116)