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:
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:
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?
Solved! Go to Solution.
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
Are you sure you do an update to the SharePoint list (via a SubmitForm or similar)?
Yes, I just have standard submit form button. It works for all fields, just not this one
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
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
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.
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
User | Count |
---|---|
261 | |
128 | |
99 | |
48 | |
47 |