cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Save and display value of combobox

hi,

 

i create a new collect by click a button

 

Collect.png

 

add a new gallery by using source data from collect "tblNewItemData"

Gallery.png

in the combobox is set datasource from collect "tblMaterialMaster.Title"

when user is able to add new item dataTransaction.png

using plus sign to add new line item:

 

Patch(tblNewItemData,ThisItem, {Product:(LookUp(tblMaterialMaster,Title=cbProductName.Selected.Title,Product)),ProductName:cbProductName.Selected.Title, DelQty: Value(txtQty.Text), BaseUnit:txtBaseUnit.Text, ShipTo: txtShipTo.Text, ShipmentNo: txtShipmentNo.Text, VesselNo: txtVessel.Text, ItemText: txtItemText.Text, New:"Added"}); Collect(tblNewItemData, {Product:"", ProductName:"", DelQty: "", BaseUnit:(LookUp(tblMaterialMaster,Title=cbProductName.Selected.Title,Base_Unit.Value)), ShipTo: "", ShipmentNo: "", VesselNo: "", ItemText: "", New:"New" })

 

the problem is combobox doesn't update and display blank

blnak.png

 

how to fix this problem?

 

Thanks,

Ratana

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @ratanapouy ,

Could you please share a bit more about the cbProductName? Is it the ComboBox within your Gallery?

Could you please show more details about the DefaultSelectedItems property formula of the cbProductName in your Gallery?

 

Please consider set the DefaultSelectedItems property formula of the cbProductName ComboBox in your Gallery to following formula:

{
   Title: ThisItem.ProductName
}

set the Items property of the cbProductName ComboBox to following:

tblMaterialMaster.Title

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Super User II
Super User II

What is the default property formula for cbProductName (added).



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Highlighted
Anonymous
Not applicable

Hi @ratanapouy 

 

Also can you check the below:

 

The datasource of combobox is set to collection - tblMaterialMaster

 

when you add new record, you can write Collect(tblNewItemData, {}) // defaults will be considered

 

Also you need not have "+" icon for each row, it can be placed above the gallery

 

Thanks.

Highlighted

If the item got added to tblNewItemData correctly using Collect() and ProductName has the correct value but isn't showing in the combobox afterwards then it most likely has to do with how the Default/DefaultSelectedItems is configured.

 

I understand that the combobox has the Items property set to tblMaterialMaster but is the formula used for the properties Default and DefaultSelectedItems? 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Highlighted
Community Support
Community Support

Hi @ratanapouy ,

Could you please share a bit more about the cbProductName? Is it the ComboBox within your Gallery?

Could you please show more details about the DefaultSelectedItems property formula of the cbProductName in your Gallery?

 

Please consider set the DefaultSelectedItems property formula of the cbProductName ComboBox in your Gallery to following formula:

{
   Title: ThisItem.ProductName
}

set the Items property of the cbProductName ComboBox to following:

tblMaterialMaster.Title

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted

(added) below cbProductName is an indicator textbox to identify it is new item or saved item.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

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