0

need your help please...

I have i created a form in powerapps but without using form control. i used a gallery control instead. so i am using forall and patch function to write back all the answers to sp list. The issue is, theres a couple of questions that im using a checkbox and the user can multiselect the answer. The problem is, the values of the multiselected box does not patch the values in SP list. the result is blank.

For my checkbox control, i am using a gallery so i can have multiple checkbox (so i have a gallery inside a gallery). the Items property my gallery with checkbox control is:

Split(ThisItem.Multiselect, ";")

and here is the function for my button control onselect property to patch the data:

ForAll(
    gal_Template.AllItems,
    Patch(
        'Site Visit Form Results',
        Defaults('Site Visit Form Results'),
        {
            'Pharmacy Location': dd_Pharmacy.SelectedText.Value,
            'RDO/RGM': lbl_rdoRgm_Val.Text,
            PIC: lbl_PIC_Val.Text,
            SiteVisitDate: dp_SiteVisitDate.SelectedDate,
            Title: btn_section.Text,
            Questions: lbl_Questions.Text,
            Answers: radio_YN.SelectedText.Value & txtInpt_Note.Text & Checkbox1.Value,
            Comment: txtInpt_ComntforNO.Text
        }
    )
)

i have tried this function below but also giving me blank results

ForAll(
    gal_Template.AllItems,
    Patch(
        'Site Visit Form Results',
        Defaults('Site Visit Form Results'),
        {
            'Pharmacy Location': dd_Pharmacy.SelectedText.Value,
            'RDO/RGM': lbl_rdoRgm_Val.Text,
            PIC: lbl_PIC_Val.Text,
            SiteVisitDate: dp_SiteVisitDate.SelectedDate,
            Title: btn_section.Text,
            Questions: lbl_Questions.Text,
            Answers: radio_YN.SelectedText.Value & txtInpt_Note.Text & if(Checkbox1.Value = true,""),
            Comment: txtInpt_ComntforNO.Text
        }
    )
)

1 Answer 1

0

You will need something close to:

Concat( Filter(YourCheckBoxGallery.AllItems, Checkbox1.Value), Checkbox1.Text, ";")
5
  • How did this go? Need any further help or questions?
    – Sam Nseir
    Commented Jan 15 at 13:23
  • i tried the formula above but its giving me an error. im trying yo patch another field on the same column. this is how i added: Answers: 'LookUp(Split("Yes;No;NA",";"), Value = radioYN_AutoOp.Selected.Value) & Concat(Filter(Gal_ChkBox_AutoOp.AllItems,Checkbox1.Value), Checkbox1.Text,";"),'
    – Aamante
    Commented Jan 17 at 0:58
  • What kind of error? You can add a Label to your main gallery to help you debug. Set's the Label's value to Concat(Filter(Gal_ChkBox_AutoOp.AllItems,Checkbox1.Value), Checkbox1.Text,";") and check if that is working.
    – Sam Nseir
    Commented Jan 17 at 1:16
  • the result is "false" value on the sharepoint list im patching the data to. so i think this is gonna work but were just missing something
    – Aamante
    Commented Jan 18 at 16:24
  • Did you try the adding a Label to help with debugging as per previous comment? What was the result? What was "false" - the value in the Answer column in SP?
    – Sam Nseir
    Commented Jan 18 at 21:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.