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

In Canvas App How to pre set lookup value

My Question regarding power canvas app

in canvas app  i created login page .in login page it will first check email and password from crm entity called dipendenti . If  eamil and password is correct it will go to next screen and in next screen as you show below second image you can see there are some field one of them is lookup field .

1.From here check email and password on behalf of that user can login into next page and name field will be store in lookup filed of next screen 

roto4.png

Login page check from dipendenti entity 

 

Login pageLogin page

2. I want to set this look up field pre set .it is possible to take name from where we checking email and password and pre set that name in lookup field  

roto2.png

this look value show the name of dipendeti entity 

roto3.png

 

 

 

 

Thankyou in advance 

!please help mw with this 

 

7 REPLIES 7
WiZey
Super User
Super User

Hello @Beginner_Aman ,

 

Yes, it is possible.

 

Inside the "Default" property of your combobox, put the "LookUp()" function to retrieve the name of the person in your table based on the condition where the mail and the password correspond.

 

LookUp(table; And(Mail=InputMail.Text;Password=InputPassword.Text)).Name

 

I hope this was helpful to you.

NandiniBhagya20
Solution Sage
Solution Sage

Hi 

Do you want to set default value of the look up field based on current logged in user ?


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Yes, Could you help me 

 

this code i use to Check login user information, i put this code into an Login button

roto5.pngroto5.png

 

After check and successfully enter into the next screen i want to pre set the lookup  value in lookup value their is name from where email  and password is enter , i just want to preset the name of that record which are list in lookup field  

 

roto5.png

This Dipendenti (syncu_dipendenti) records ,  All Nome(Name) Exist in lookup field

roto5.png

 

This is one of those record which are i am login through there email and Password and this record name i want to pre set in the lookup field , which are in  another screen of canvas app

 

roto4.png

 

 

Thankyou very much for reply ! #Wizy

I tried your code but does not work for me.  please understand my scenario and help me with this

 

Yes but in my case all record having their password and email if Someone enter particular record email or password name field be pre set in lookup field or if there is another way to set the name on another screen then please help me with this 

Thank you very much for reply #

NandiniBhagya20
 
WiZey
Super User
Super User

You've put the "LookUp()" in the wrong property of the dropdown.

 

You've put it in "OnChange()" when it should be in "Default" property.

 

Also, you must swap "table" and "name" with your table name and your column name to properly retrieve the column's value from your table. 

"table" and "name" were merely examples in my sample code as I don't know your table's name and structure.

I put this code On  default but it's not work for me , And my table name is 

Beginner_Aman_0-1658760681984.png

First one is table name  of current screen form And second yellow mark is represent Lookup field logical name 

But i want to pre set the lookup value base on our login page which are compare from user id and password from another entity (syncu_dependentie )

Beginner_Aman_1-1658761897011.png

After compare email and password it auto set lookup value from which they login 

 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,562)