cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JRobinson12
Helper II
Helper II

Trying to copy dropdown selection to Text Input Field on in Form.

I am trying to copy the selection from (first screen) that contains the (ProductCode_Dropdown and BatchNumber_dropdown) boxes to the Product Code Data Card and Batch Number data card respectively located on the form called (Form1). So whatever the user selects on the (ProductCode_dropdown) and (BatchNumber_dropdown) on the first screen, I want that selection to be shown in the (Product Code) and (Batch #) Text Input on the form.

The Product code dropdown batch number dropdown list is from two separate excel sheet. (Product Code1.xlsx) and (Batch Number.xlsx)

6 REPLIES 6
WarrenBelz
Super User III
Super User III

Hi @JRobinson12 ,

The Item of your form will be something like

Lookup(
   BatchNoTableName,
   ProductCode=YourProdCodeDDName.Selected.ProductCode &&
   BatchNo=YourBatchNoDDName.Selected.BatchNo
)

NOTE - I have assumed field and table names - so you will need to change to yours. Also .Selected.xxx may be different depending on the Items of the DropDown.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

JRobinson12
Helper II
Helper II

This was giving me error. I new to PowerApps. Like a week into PowerApps.
 
My dropdown boxes are called:

BatchNumber_dropdown

ProductCode_droprown. 

Both of the drop down boxes are located on a next screen (not on the form). Also the (BatchNumber_dropdown) datasource is NOW from a sharepoint list called (Batch Number) 

(ProductCode_dropdown) datasource is NOW from a sharepoint list called (Product Code). 

*LOCATED on the FORM*
(Batch#) Text input field is called (DataCardValue1) and the data card called (Batch#_DataCard1)

On Default Property:ThisItem.’Batch #’

 

(Product Code) Text input field is called (DataCardValue3) and the data card called (Product Code_DataCard1) 

On Default Property: ThisItem.’Product Code’

Hi @JRobinson12 ,

It will be something like

Lookup(
   'Batch Number',
   'Product Code'=ProductCode_dropdown.Selected.'Product Code' &&
   'Batch #'=BatchNumber_dropdown.Selected.'Batch #'
)

Assuming both 'Product Code' and 'Batch #" as fields in 'Batch Number' and you have selected matching items in the two drop-downs, this should show the matching record in the form. As I mentioned, you will have to make sure all the references match your data and fields.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

This is the item property of my form. How would I incorporate the Lookup in this.

See the image below.

@JRobinson12 ,

I assume you want these in View Mode? So if in this mode, is EntryTypeVar "View" (or Blank)?

If not, you need to make it this way and use something like

If(
   EntryTypeVar="New",
   Defaults(Materials),
   EntryTypeVar="Edit",
   MainGallery.Selected,
   Lookup(
      'Batch Number',
      'Product Code'=ProductCode_dropdown.Selected.'Product Code' &&
      'Batch #'=BatchNumber_dropdown.Selected.'Batch #'
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @JRobinson12 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (48,646)