cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Evastor
Frequent Visitor

Dropdown value to Text Label and submit on Sharepoint

Hello,

 

I have Sharepoint list that is the source of my app. I have edit form and 3 columns that are important for this issue:

1. Country - DataCardValue53 - combo box (single choice)

2. MU - DataCardValue62 - combo box (single choice)

3. Standard MU - DataCardValue12 - text label

 

What I want to do is to put the value from MU (DataCardValue62) to Standard MU field (DataCardValue12) with some exceptions.

 

I prepared a function for the Default property of the Standard MU field as below:

If(DataCardValue53.Selected.Value = "France",
Switch(DataCardValue62.Selected.Result,
"FS", "FS",
"AIRBUS", "MALS",
"AERO SPACE", "MALS",
"AUTO", "MALS",
"MANUF LS", "MALS",
"SSE", "SPS",
"TRANSP SERV", "SPS",
"MINIST. COMMU.", "SPS",
"CPRD", "CPRD",
"EDF", "EUC",
"UTILITIES", "EUC",
"RESOURCES", "EUC",
"TMT", "TMT",
"Other", "Other"
),
If(DataCardValue53.Selected.Value = "Spain", DataCardValue62.Selected.Result,
If(DataCardValue53.Selected.Value = "Italy",
Switch(DataCardValue62.Selected.Result,
"CPRD", "CPRD",
"EUCS", "EUC",
"FS", "FS",
"MALS", "MALS",
"TMT", "TMT",
"SPS", "SPS"),
If(DataCardValue53.Selected.Value = "Belgium", DataCardValue62.Selected.Result)
)))

 

This is working and the result is correctly displayed  in the Standard MU text field as shown below:

Evastor_0-1654257791203.png

The problem is now how to take this value and update the single line of text on Sharepoint with it. For now in the update property of the Standard MU card I have the following:  

Evastor_1-1654257881428.png

It seems that it's not working as the field on Sharepoint is still empty and when I return to this item in the edit form it's again blank. 

 

Can you please help?

1 ACCEPTED SOLUTION

Accepted Solutions
Evastor
Frequent Visitor

Ok, I've found a solution.

 

In the Sharepoint I've changed Standard MU (btw renamed to OfficialMU) to choice columns with all the available options. 

 

In the app in the DefaultSelectedItems property I put: Distinct(Filter('Cluster MU', MU = DataCardValue62.Selected.Result, Title = DataCardValue53.Selected.Value), OfficialMU).Result

In the items property: Distinct(Filter('Cluster MU', MU = DataCardValue62.Selected.Result, Title = DataCardValue53.Selected.Value), OfficialMU).Result

 

And in the update property of the card I put: {Value:DataCardValue13.Selected.Result}

 

Working 🙂

 

Nevertheless thanks guys for tips

View solution in original post

6 REPLIES 6
uwenagel
Resolver II
Resolver II

Are you sure you do an update to the SharePoint list (via a SubmitForm or similar)?

Evastor
Frequent Visitor

Yes, I just have standard submit form button. It works for all fields, just not this one

v-xiaochen-msft
Community Support
Community Support

Hi @Evastor ,

 

I checked the formula and I didn't see any errors.

I suggest you open a support ticket.

Get Help + Support - Power Platform | Microsoft Docs 

 

Best Regards,

Wearsky

uwenagel
Resolver II
Resolver II

I also do not see any error.

 

Can you try, putting a less complex formula into the Default property. Does it show the same behavior?

Did you try monitoring the actions when you do the SubmitForm to check what is really sent to the SharePoint?

 

Best regards

Uwe

Drrickryp
Super User
Super User

@Evastor 

When a form does not submit a value properly, the problem is usually on the Update property of the card. Make sure it references the correct control.

Evastor
Frequent Visitor

Ok, I've found a solution.

 

In the Sharepoint I've changed Standard MU (btw renamed to OfficialMU) to choice columns with all the available options. 

 

In the app in the DefaultSelectedItems property I put: Distinct(Filter('Cluster MU', MU = DataCardValue62.Selected.Result, Title = DataCardValue53.Selected.Value), OfficialMU).Result

In the items property: Distinct(Filter('Cluster MU', MU = DataCardValue62.Selected.Result, Title = DataCardValue53.Selected.Value), OfficialMU).Result

 

And in the update property of the card I put: {Value:DataCardValue13.Selected.Result}

 

Working 🙂

 

Nevertheless thanks guys for tips

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (1,917)