cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Awad0367
Helper I
Helper I

lookup a list and fetch a related column text based on a selection of another column selected by dropdown box

I have a  vendor list "leverantor"with 2 columns vendor name and organization number 

I Have a parent list for my invoice called rekvisition that has a lookup column ""LeverantörNamn" . I need to create a new field Column LevOrgNr in parent list  be populated with org number based on a selection of a leverantornamn "combobox "

in power app page create new invoice 

se bilder

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @Awad0367,

If you want to populate the LevOrgNr with organization number from leverantor based on leverantornamn Combo Box selected, you should define the one-to-one correspondence between the two columns, for example, if the leverantor is ALINGSAS BILDELAR, the organization number should be 1001, just as below:

vqiaqimsft_0-1656558252773.png

So please input the corresponding organization number within the leverantor list, then you could populate the the LevOrgNr name(If it is a text column type) by setting a default property of the textinput control as below:

LookUp(Leverantor,Leverantor=ComboBox.Selected.Value).Organizationname

 

Best Regards,
Qi

View solution in original post

2 REPLIES 2
v-qiaqi-msft
Community Support
Community Support

Hi @Awad0367,

If you want to populate the LevOrgNr with organization number from leverantor based on leverantornamn Combo Box selected, you should define the one-to-one correspondence between the two columns, for example, if the leverantor is ALINGSAS BILDELAR, the organization number should be 1001, just as below:

vqiaqimsft_0-1656558252773.png

So please input the corresponding organization number within the leverantor list, then you could populate the the LevOrgNr name(If it is a text column type) by setting a default property of the textinput control as below:

LookUp(Leverantor,Leverantor=ComboBox.Selected.Value).Organizationname

 

Best Regards,
Qi
Awad0367
Helper I
Helper I

Thank you for your help, I did figure it out exact as you did but column name worked with Title instead for Leverantor. 

I have an issue with my invoice number variable that generate a number when a new invoice button at start is pressed. I need this number to decrement IF the new form is not submitted so that I do not consume that numeber in vain. Here is the variable 


Set(
varRkv;
First(
Filter(
'Rekvisition nummer';
ID =1
)
).Title
);;
UpdateIf(
'Rekvisition nummer';
ID = 1;
{
Title: Concatenate(
"RikvNo-";
Text(
Right(
varRkv;
5
) + 1
)
)
}
)

Se the image where the new number is generated 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,577)