cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lg270492
Advocate II
Advocate II

Populate text input based on combobox selection

Hi All, 

 

I was wondering again if I could have some help, I am once again pulling my hair out! Sorry I am pretty new to all of this 😞

 

I have a dropdown box providing a list of shipping plants - Distinct('Sales Order Tracker','Shipping Plant Legacy')

 

The dropdown box then filters the results of my combobox for order numbers.

 

The order number combobox items property is - Filter('Sales Order Tracker','Shipping Plant Legacy' = Dropdown2.Selected.Result).'Blackout Order #'

 

Now I have some text inputs which I would like to automatically populate based on the selection of the pre-filtered combobox and for the life of me I cannot work out how to do this. 

 

PLEASEE HELPP MEEEE!  

1 ACCEPTED SOLUTION

Accepted Solutions

@lg270492 

 

First, set your Data row limit to 1 to make sure the app works with more than even the local maximum of 2000 records, from the sound of what you have, you might already need a solution that is not restricted by this limit at all if possible.

 

1. Settings

2. Change the Data row limit to 1. The default is 500, and the maximum is 2000 - but don't change it to 2000 - change it to 1

poweractivate_0-1664872234598.png

 

Once you do the above, if you see 1 record anywhere, you know you are restricted by the delegation limit - with or without the warning - and if you see all your records or more than one record, you are likely not restricted. 

 

It looks like putting the whole data source directly in the Items property of a ComboBox might trigger the delegation limit, this may be an issue for you.

 

Although a more complex solution may still be possible to try and recreate the autosuggest functionality of the ComboBox without the delegation limit, let's suppose you want a simpler solution for now.

 

if you can get away with it (or even if you prefer it better), just use a simple Text Input, not a ComboBox, and then a Button such as a "Go" button.

 

Put nothing in for the Default of the Text Input, or put this

 

""

 

 

Use this formula for OnChange of the Button

 

Set(someVar,LookUp(dataSource,blackOutOrderNumberColumn=TextInput1.Text))

 

 

For the DefaultMode property of the Form

 

FormMode.Edit

 

 

For the Item property of the Form

 

someVar

 

 

See if it helps @lg270492 

View solution in original post

19 REPLIES 19

@lg270492 

 

Does the ComboBox allow multiple selections or just one?

Just one! 

@lg270492 

 

 

For the Default property of each Text Input Control put this:

//pseudocode
LookUp(someDataSource,someColumn=First(OrderNumberCombobox.SelectedItems).Result).somePertinentColumn

See if it helps @lg270492 

@poweractivate thanks for that.

 

Unfortunately using the above and inputting my datasource etc it still wont work 😞

LookUp('Sales Order Tracker', 'Carrier Name'=First(OrderNo_Combo.SelectedItems).Result).'Carrier Name'

 

Am I doing it correctly? 

 

The error I receive is: 

lg270492_0-1665056238187.png

Thanks again! 

@lg270492 

I should account for the possibility the Combo Box has no selection, or else it may have an error when it's Blank.

With
(
    {si:First(OrderNo_Combo.SelectedItems).Result}
   ,If
    (
       !IsBlank
       (
          si
         ,LookUp
         (
            'Sales Order Tracker'
            ,'Carrier Name'=si
         ).'Carrier Name'
        )
     )
)

See if it helps @lg270492 

Unfortunatley not, I am still returning errors 😞

- Name isnt valid.'Result' isnt recognized

- Invalid argument type. Cannot use _Min values in this context

 

Any other idea what it could be @poweractivate ?

@lg270492 

 

Try this instead

With
(
    {si:OrderNo_Combo.SelectedItems}
   ,If
    (
       !IsBlank
       (
          si
         ,LookUp
         (
            'Sales Order Tracker'
            ,'Carrier Name'=First(si).Result
         ).'Carrier Name'
        )
     )
)

 

If the above does not work, also try the below:

 

1. Are you putting the formula in the Default of a Text Input Control? If it's not Text, you may have to change the formula

2. Is the data source column 'Carrier Name' a Text? If not, you may have to change the formula

 

 

No luck again 😞

 

1. Are you putting the formula in the Default of a Text Input Control? If it's not Text, you may have to change the formula - Yes its all text format

2. Is the data source column 'Carrier Name' a Text? If not, you may have to change the formula - Yes its text

 

Not sure what else I can do 😞

@lg270492 

What error is shown in the new version of formula I provided?

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

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