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

Filtering gallery by multiple dropdowns AND search box

Hi,


I have a built a form with 40 questions and each of them have one dropdown and radio check box. The users have to select a response from each of this option. 

 

I am able to patch the only first questions responses to to SharePoint now. And unable to do it for the next set of questions? In screenshot, i am sharing only 2 questions to keep it simple.

Capture.PNG

 

Any solution to this would be helpful.

7 REPLIES 7
LRVinNC
Super User
Super User

Are you saving these as one item in your SP list per question - so 40 items to record the 40 questions with 2 columns per item (plus whatever other identifying columns you may have)?  Or are you saving one item in your SP list containing the answer to all 40 questions  - so  80 columns (plus id columns) for each item?

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
v-xida-msft
Community Support
Community Support

Hi @Santosh_M ,

Could you please share a bit more about your issue?

How do you patch the response and answer to your SP list within your app? Could you please share a bit more about the formula?

Further, do you list your questions and answers within a Gallery or a Edit form?

 

If you list your questions within a Edit form, I have made a test on my side, please take a try with the following workaround:7.JPG

 

8.JPG

Set the Update property of the Question Data card which contains the Dopdown box and Radio button to following:

If(
    IsBlank(Radio2.Selected.Value),   /* <-- Radio2 represents the Radio control within the correspoding Question data card in your Edit form */
    Dropdown1.Selected.Value,         /* <-- Dropdown1 represents the Dropdown box within the corresponding Question data card in your Edit form */
    Radio2.Selected.Value
)

 

If you list your questions within a Gallery, I think the Patch function and ForAll function could achieve your needs. I have made a test on my side, please take a try with the follownig workaround:9.JPG

 

10.JPG

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

ForAll(
       Gallery1.AllItems,
       Patch(
             '20190325_case13',
             Defaults('20190325_case13'),
             {
               Title: If(IsBlank(Radio4.Selected.Value), Dropdown3.Selected.Value, Radio4.Selected.Value)
             }
       )
)

On your side, you should type:

ForAll(
       Gallery1.AllItems,    /* <-- Galery1 represents the Gallery in your app */
       Patch(
             'YourSPList',             /* <-- 'YourSPList' represents your SP list data source */
             Defaults('YourSPList'),
             {
               AnswerColumn: If(
IsBlank(RadioButton.Selected.Value), /* <-- RadioButton represents the Radio control within your Gallery */
DropdownBox.Selected.Value, /* <-- DropdownBox represents the Dropdown control within your Gallery */
RadioButton.Selected.Value
) } ) )

Note: The AnswerColumn represents the column in your SP list, which used to store the question answer.

More details about ForAll function and Patch function, please check the following article:

ForAll functon, Patch function

 

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.

Hello,

 

The list will have 40 items to record the 40 questions with 2 columns per item. 

 

Thanks,

 

Santosh


@LRVinNC wrote:

Are you saving these as one item in your SP list per question - so 40 items to record the 40 questions with 2 columns per item (plus whatever other identifying columns you may have)?  Or are you saving one item in your SP list containing the answer to all 40 questions  - so  80 columns (plus id columns) for each item?


Hello,

 

The list will have 40 items to record the 40 questions with 2 columns per item. 

 

Thanks,

 

Santosh

Hi @Santosh_M ,

Has you taken a try with the solution I provided above?

Have you solved your problem?

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been 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.


@v-xida-msft wrote:

Hi @Santosh_M ,

Has you taken a try with the solution I provided above?

Have you solved your problem?

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,


Hey, I am yet to implement this one. Will post reply once done with that.

Hi @Santosh_M ,

Have you taken a try with the solution I provided?

Have you solved your problem?

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been 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.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,683)