web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Update form field with...
Power Apps
Unanswered

Update form field with a choices from other list

(0) ShareShare
ReportReport
Posted on by

I have 2 SharePoint List: Company and Contact list. The company has Title (Code for company C1,C2,C3, etc) and Company Name, Contact list has Id Company (C1, C2) for relation with Company List.

 

I to need and i have a problem:

 

1. Display in the form Contact the Drop Down with all names from the company Name from company List

2. When submit the form y to need saved the Id company in the contact list (IdCompany), but i do not how to do that

 

1. I can show the company in the Drop Down.

   a. Look the image:

      

RoberthCB_0-1701621704662.png

 

   b. Default Value: If(VarNuevoRegistro,"NEW COMPANY",LookUp(CompaniaCRM, Title = GalContactos.Selected.IdCompania,NombreCompania)) 

2. But I can not save the form with the choices from the list,  i need save the code, how to do that?

 

Thanks a lot.

 

 

 

 

Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    Try this

     

    Set(varSelectedCompanyCode, LookUp(Company, CompanyName = Dropdown1.Selected.Value, Title));
    SubmitForm(FormName);

     

     

    This in the Default value of id field

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

    varSelectedCompanyCode

  • RoberthCB Profile Picture
    on at

    I obtain this error: 

    RoberthCB_1-1701625378315.png

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @RoberthCB,

    Could you please tell me that:

    1). If the 'Id Company' column in your Contact list is LookUp type?

    2). How you set the Items property of the IdCompany dropdown?

    3). What exactly you want to save to Contact list, IdCompany or corresponding company name based on IdCompany?

    4). Why you set a TextInput and a Dropdown box at a single data card?

     

    I think  'Id Company' column in your Contact list is not a LookUp type, there is just relationship between contact list and company list, right?

    Actually, I don't understand much more about your scenario, most of the users will use the LookUp column to relate two lists.

     

    By the way, you could not set a variable into the Default property of the dropdown

  • RoberthCB Profile Picture
    on at

    Hi, here my answer to your questions.

    1). If the 'Id Company' column in your Contact list is LookUp type?, The field in the contact list is IdCompnay that equal to Title in the Company list.

     

    2). How you set the Items property of the IdCompany dropdown?, with this instruction: 

        In Items: Distinct(Sort(Company,NameCompany),NameCompany)

        In default: If(VarNuevoRegistro,"NEW COMPANY",LookUp(Company Title = GalContactos.Selected.IdCompany,NombreCompany))

    3). What exactly you want to save to Contact list, IdCompany or corresponding company name based on IdCompany?: I need to save IdCompany

    4). Why you set a TextInput and a Dropdown box at a single data card?

     

    Regards

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard