cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Responsive Resident
Responsive Resident

Unable to update the drop down collection value to share point list

Hi all experts,

 

I'm trying to update the collection value to my sharepoint list, but unable to update the dropdown values, can anyone please let me know what m i doing wrong? as i can see that the other values are being updated but the only dropdown value is not been updated to my sharepoint list.

 

I don't know what is the reason or the error, as i there are no such warning which i can see. 

Please see the code below for the reference. 
Please let me know if anyone has the right solution to this. 
Untitled.png
ON success of the form:

ForAll(
    GLItems,
    Patch(
        PettyCashTesting,
        Defaults(PettyCashTesting),
        {   
            Title: User().FullName,
           'Day total': Value(TotalItems),
            'GL codes': Value(Items)
       }
    )
) ;

Navigate(SuccessScreen, ScreenTransition.Fade);

Clear(GLItems);


Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Responsive Resident
Responsive Resident

Thanks @v-siky-msft 


i got the solution i just modified the formula in some ways and just passed in the collection to glcode filed and it worked fine for me. 

 

ForAll(
    GLItems ,
    Patch(
        PettyCashTesting,
        Defaults(PettyCashTesting),
        {   
           Title: "",
           'Day total': Value(TotalItems),
            'GL codes': GItems
        }
    )
) ;

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @Tapesh ,

 

What are the option values of GL code dropdown? Please share some sample.

What is the data type of GL code column?

 

The ForAll function syntax is prefect, the only possibility of the issue is from 'GL codes': Value(Items) code.

The value in Items column must be pure Numbers and cannot contain other kind of characters. Please check the values in Items column.

Sik

Responsive Resident
Responsive Resident

Hi @v-siky-msft 

Thank you for getting back on my query sir. 

Please find the details below, 

The GL code filed in the power app is dropdown filed, but in the SPlist i have made it as single line text. 

And in the dropdown of power apps i created a table, as follow:

 

ON items :

[ "Bank Charges", "Bus Transport", "Equipments", "Cleaning and Household", "Housekeeping", "Heat", "Sports", "Medical First Aid", "Postage", "Others"]

 


ON select of Add button: 

I created a collection using this formula: 

 

Collect(GLItems, 
{
    Items: Dropdown2.Selected.Value,
    TotalItems: DataCardValue18.Text
});

 

ON save button of the form: 

 

SubmitForm(Form2);
Navigate(SuccessScreen, ScreenTransition.Cover);
ResetForm(Form2);

 

and on Success property of the form: 

As you have seen in above post message using for all function: 

 

The GLcode is DataCard in my power apps, which i edited and made the dropdown filed. 

is it something im i missing here ?

please see the SharePoint list wherein GL code filed is updated but only by one name where as i had 3 items in my collection which should show in Sharepoint. " of them did not get updated and are missing. 
Untitled.png
Thanks 

 

Responsive Resident
Responsive Resident

Thanks @v-siky-msft 


i got the solution i just modified the formula in some ways and just passed in the collection to glcode filed and it worked fine for me. 

 

ForAll(
    GLItems ,
    Patch(
        PettyCashTesting,
        Defaults(PettyCashTesting),
        {   
           Title: "",
           'Day total': Value(TotalItems),
            'GL codes': GItems
        }
    )
) ;

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (45,979)