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

Default value is not showing in combobox for the dependent field

In reference to the screenshot, I have used many combobox over the App ,with respect to selection over browse screen we can see that default value for non dependent combo box (source,Req Sub type etc) as there are directly connected to source table 

 

& the formula i have used for this non dependent combobox is:

 

item=Source_T.Source

DefaultSelectedItems=Filter(MDM_Tracker_T,'Serial No.'= DataCardValue29. Text)

 

but the problem is with requester Name & Region combobox , over the edit screen it is showing blank instead of retaining the data that we select in the Browse screen.However if we change the data in combobox its making the change in our source file

 

requester Name: Item=Office365Users.SearchUser({searchTerm:ComboBox6.SearchText})

Region: Item=Sort(Distinct(Region_Market_T.REGION,REGION),Result)

 

DefaultSelectedItems is same as other combobox.

 

solution expected: need to see the default selected value in Edit screen as we see over other combobox, instead of Blank.

 

 

5 REPLIES 5
Community Support
Community Support

Hi @Hemanthgowda :

Could you tell me :

  • What is ComboBox6?
  • What is the field corresponding to 'requester Name' in the data source? What is the data type?Whether to allow multiple selection?
  • What is the field corresponding to 'Region' in the data source? What is the data type?
  • Whether the two combobox allows multiple selection?

Best Regards

Bof

  • What is ComboBox6?:  its the Requester Name

 

  • What is the field corresponding to 'requester Name' in the data source? What is the data type?Whether to allow multiple selection?: the data source is office 365 user directory basically the idea was to pick the name of the person whom we search over combo box from the directory, the data is text

 

  • What is the field corresponding to 'Region' in the data source? What is the data type?: its actually the region names & over the source we have 2 columns Region & Market where each region as many markets so we applied the distinct over the formula & the data type is text

 

  • Whether the two combobox allows multiple selection?: No we have set the select-multiple to false for both the columns

Let me know for more clarification.

Hi @Hemanthgowda :

I may not express it clearly.

Based on the code you provided, I already know what the data source of these two controls is.

What I want to know is:

  • Where do their default options come from?
  • Is it related to the table MDM_Tracker_T?
  • What is their relationship?

In addition ,the best way to set up the default selected selection is to reference their data source itself.

For example:

requester Name:

Item=Office365Users.SearchUser({searchTerm:ComboBox6.SearchText})

DefaultSelectedItems=First(Office365Users.SearchUser({searchTerm:ComboBox6.SearchText}))

Region:

Item=Sort(Distinct(Region_Market_T.REGION,REGION),Result)

DefaultSelectedItems=lookup(Sort(Distinct(Region_Market_T.REGION,REGION),Result),Result="XXX")

 

Best Regards,

Bof

Thanks for the details, I tried using the formula :

 

DefaultSelectedItems=First(Office365Users.SearchUser({searchTerm:ComboBox6.SearchText})) but its giving the 1st record of my office365user directory, ideally it should be from the records which I select from MDM_Tracker_T source in browse screen

 

say for example i have selected request no 5 in browse screen so I can see all the details regarding this request in Details screen & if i want to edit this data then over edit screen I can see all the data is reflecting in respective combobox except for Request-Name & Region (it is showing as blank) where is should have the default value of request no 5.

 

 

  • Is it related to the table MDM_Tracker_T?: Yes there is where the data is looked up
  • What is their relationship?: MDM Tracker_T is the source where user entered data is stored & the Combobox is linked with different source but it as it filter & show what we select over the MDM_Tracker_T.

 

 

 

 

Hi @Hemanthgowda :

The code I gave you is just an example, because I don’t understand the details of the various controls and data sources (MDM_Tracker_T) in your app.

Maybe the example I provided is more ambiguous, or you can try this code:

 

LookUp(Office365Users.SearchUser({searchTerm:ComboBox6.SearchText}),Mail="Specify email address")

 

Best Regards,

Bof

 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (77,265)