cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mayarnaldo15
Helper I
Helper I

How to save dropdown selected item to Sharepoint list as single text

Hi,

 

I created a dropdown for hours and minutes and the values are hard-coded.

 

hour_minute.jpg

I want to save this selected value in Sharepoint list as single text.

I already created a column in Sharepoint list and trying to patch it.

 

 

 

 

If(varMode = "New",

//Patch the Title and Choice and get the list ID
Set(TempCol, Patch(QAOversightApp, Defaults(QAOversightApp),
{
    Date:DataCardValue5_2.SelectedDate,
    Room: DataCardValue6_2.Selected,
    Activity:DataCardValue3_2.Selected,
    Comment:DataCardValue4_2.Text,
    Hour1:HourValue1_3.Selected.Value,
    Minute1: MinuteValue1_3.SelectedText.Value

}));
//Update with patch function the attachment 
Patch(QAOversightApp, LookUp(QAOversightApp, ID = TempCol.ID),
{

}, Form1_2.Updates);
varMode="Edit", SubmitForm(Form1_2));
Back()

No errors but I didn't save anything in the Sharepoint List.

 

What am I missing?

 

Any help is appreciated! Thanks! 🙂

3 REPLIES 3
zmansuri
Super User
Super User

if Hour1 is Text type column this line should store text value in it.

Hour1:HourValue1_3.Selected.Value

 

For debugging try storing columns one by one. So you can narrow down to the column that's causing problem

 

 

Hi,

 

Thank you for your reply.

 

I tried to use "Text" instead "Selected.Value". It gives me error because I used dropdown.

 

Any work around suggestion?

 

Thanks again,

May

a5.jpga6.jpg

 

Selected Value is the correct code that's why i told you to try saving one line at a time. So you'll narrow down the root cause of the problem

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 (1,979)