cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SatishB1
Level: Powered On

Setting value for DropDown in EditForm

Hi All,

 

I've a SharePoint List which is customized with Powerapps, the form contains 3 drop downs(Region,Country,BusinessFuncion) Region and Country are cascade dropdowns and all three fields are lookup fields in list. They are working fine while creating a new item but when Admin tries to edit a specific record details the values are not getting binded properly I'm using the below formula in Default property of Region dropdown(formula is Similar for Country,BFunction),

 

If(SMEMentorForm.Mode=FormMode.Edit Or SMEMentorForm.Mode=FormMode.View,First(Filter('Source',ID=Value(txtID.Text))).Region.Value)

 

When Admin edits the list item after refreshing the page for very first time, the first record values in list are getting binded to Region,Country,BFunction irrespective of the ID value other fields are working fine.and again when Admin tries for second time proper values are getting binded to dropdowns.

Not able to understand Powerapps behaviour here.

 

Any help would be appreciated!

 

Thanks,

SB

1 ACCEPTED SOLUTION

Accepted Solutions
SatishB1
Level: Powered On

Re: Setting value for DropDown in EditForm

Hi All,

 

I got the form working as expected I changed the formula to below one,


If(SMEMentorForm.Mode=FormMode.Edit Or SMEMentorForm.Mode=FormMode.View,LookUp('Source',txtID.Text in ID).Region.Value)

 

Thought it might helpful for others! Have a great day guysSmiley Happy

 

Thanks,

SB

3 REPLIES 3
egallis
Level 10

Re: Setting value for DropDown in EditForm

Hi @SatishB1,

Could you please share with us how you set up the Items properties of your DataCardValue controls for your 3 drop-downs Region, Country and Business Function ?

Emmanuel

SatishB1
Level: Powered On

Re: Setting value for DropDown in EditForm

Hi Emmanuel,

 

I've set the Items property of BusinessFunction dropdown to SortByColumns(BusinessFunction,"Title",Ascending), Similar to Region from RegionList and for Country.

 

 

Thanks,

Satish

SatishB1
Level: Powered On

Re: Setting value for DropDown in EditForm

Hi All,

 

I got the form working as expected I changed the formula to below one,


If(SMEMentorForm.Mode=FormMode.Edit Or SMEMentorForm.Mode=FormMode.View,LookUp('Source',txtID.Text in ID).Region.Value)

 

Thought it might helpful for others! Have a great day guysSmiley Happy

 

Thanks,

SB