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

Value in sharepoint form not updating

Ive got a Toggle in which i want to default selected item on a dropdown list (3 items on the dropdown list). 

It submits to the sharepoint list fine, however when i go into the sp item to edit, it doesnt register the change (stays at the original value) . 

Side note: I'm also not able to see the toggle button in "view" mode. not sure if this is a bug... 

 

karlosch_0-1606454502838.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @karlosch :

According to your formula, the default value of combobox has nothing to do with the status value of the item itself but only with the value of DataCardValue56.Value. So it is impossible to display "Team leader checked".

You need to set a condition, when it is met, combobox defaults to "Team leader checked".For example:

If(
   ThisItem.Status.Value="Team leader checked",
   ThisItem.Status,
   If(
    DataCardValue65.Value,
    LookUp(XXX),
    LookUp(XXX)
   )
)

Best Regards,

Bof

 

View solution in original post

6 REPLIES 6
clare-sy
Frequent Visitor

1. I realized that  you're using Combo box instead of dropdown list ,these 2 controllers are little different in use.

but I checked in my sharepoint  list ,it goes correctly, if it still does not work ,you can try dropdown control as a backup

2. if you're using dropdown , i need to remind you that the LookUp function has 3 paremeters: LookUpTableFormula [, ReductionFormula ] ) 

in your formula , you just has 2 parameters, which means:"  If you don't use this parameter, the function returns the full record from the table. "

 so , if you're using dropdown , the code would be:

If(DataCardValue*.Value, LookUp(Choices(****) ,Value="***", Value),LookUp(Choices(****) ,Value="choB",Value))

 

just in case , make sure the combo box or the dropdown control has the correct item property

 

let me know whether it's working

 

BTW: what do you mean you cannot see the toggle button is view mode , in the view mode in sharepoint , we can just see the toggle control's value,true or false,we cannot see the control itself

 

StevenZhang
Resolver I
Resolver I

Hi,

 

I did test in my environment, it is working.

1. create SP list.

2. add a toggle in the Canvas.

3. add a edit form, it will automatically link to status field of the list with dropdown box.

t1.jpgt2.jpg

I just realized that you might link the toggle to a field of the list? if so need to add toggle inside the datacard.

Thanks Steven, it works for me. The only problem is that if i want to Edit the status (i go into the form and edit, and update the status from "Escalated to team leader" to "Team leader checked") the sharepoint list updates but the sharepoint form view doesnt.... there is no problem if i remove the code/logic so not sure whats happening... See screenshot (sp list is different to sharepoint form view)

 

karlosch_1-1606563991168.png

 

 

v-bofeng-msft
Community Support
Community Support

Hi @karlosch :

According to your formula, the default value of combobox has nothing to do with the status value of the item itself but only with the value of DataCardValue56.Value. So it is impossible to display "Team leader checked".

You need to set a condition, when it is met, combobox defaults to "Team leader checked".For example:

If(
   ThisItem.Status.Value="Team leader checked",
   ThisItem.Status,
   If(
    DataCardValue65.Value,
    LookUp(XXX),
    LookUp(XXX)
   )
)

Best Regards,

Bof

 

v-bofeng-msft
Community Support
Community Support

Hi @karlosch :

According to your formula, the default value of combobox has nothing to do with the status value of the item itself but only with the value of DataCardValue56.Value. So it is impossible to display "Team leader checked".

You need to set a condition, when it is met, combobox defaults to "Team leader checked".For example:

If(
   ThisItem.Status.Value="Team leader checked",
   ThisItem.Status,
   If(
    DataCardValue65.Value,
    LookUp(XXX),
    LookUp(XXX)
   )
)

Best Regards,

Bof

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,965)