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

Fetching a saved record from my dataverse database as the default item of my combobox

I have been struggling with this for sometime and i would appreciate any help i can get.

 

i have a gallery that is connected to a collection named tempcoll and i inserted a combo box within the gallery.

i set the Item property of the combobox as: Distinct(Resourcess,'Employee Name')

 

I inserted a button with this two conditions onselect:

If(CountRows(tempcoll)>0,Set(dataexists,true),Set(dataexists,false));

 

ClearCollect(tempdata,ShowColumns(RenameColumns(collpositonholders,"erms_positionholdersname","PositionName"),"PositionName","erms_response_org_unit_type","erms_position_holder_name","erms_position_holder_email","erms_position_holder_phone","erms_type","erms_positionholdersid"));

 

If (!dataexists, ClearCollect(opdata,
tempdata,ForAll(lookup_table,Patch(tempdata,Defaults(tempdata),{PositionName:ThisRecord.PositionName}))
));

 

If i save a data to my database and i come back to my screen the combobox does not fetch the record that i have save to my database already and i am having trouble displaying the content already in my database to my gallery.

 

I will appreciate any help i can get.

 

Thanks

2 REPLIES 2
rampprakash
Community Champion
Community Champion

Hello @Advok8,

 

Could you please tel me how you are adding ComboBox value into collection. Because I can see only distinct values which you are using for Default items of ComboBox.

 

 

Please mark as Answer if it is helpful and provide Kudos


Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com

 

 

EricRegnier
Super User
Super User

Hi @Advok8,

After your save/patch operation, execute refresh operation. More info: https://docs.microsoft.com/powerapps/maker/canvas-apps/functions/function-refresh 

Example: Refresh(Resourcess)
Hope this helps!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (1,653)