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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Save Lookup column in ...
Power Apps
Unanswered

Save Lookup column in submit form powerapps

(0) ShareShare
ReportReport
Posted on by 428

Hi All 

 

I have lookup column which will be having an option "others" now on edit form on choice of other it show textbox and save value in sharepoint in lookup column
It save other values but not the value from textbox 

 

Can anyone guide how to achieve it 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    on at

    Hi @Ashok2 ,

     

    Could you please share more details about your scenario? What do you mean by "show textbox"? Do you mean when selecting "others" option a Text Input box will display and let user fill in then update the filled in value to the look up list?

     

    If so, you will need to use another Patch function rather than the SubmitForm function:

    //create a new item in the list that the LookUp column look up in.
    Patch(YourLookUpList, Defaults(YourLookUpList), {ColumnLookedUp: TextInput.Text});
    If(Form.Mode = FormMode.New,
    //in new mode create a new item in this list.
     Patch(ThisList,Defaults(ThisList),{LookUpColumn: LookUp(YourLookUpList, ColumnLookedUp = TextInput.Text)}),
    //in other mode edit the selected item of this list.
     Patch(ThisList, Gallery.Selected ,{LookUpColumn: LookUp(YourLookUpList, ColumnLookedUp = TextInput.Text)})
    )

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Ashok2 Profile Picture
    428 on at

    @v-jefferni 

    I am trying but getting error Missing a column 'Id' with a type of 'Number' and as well how to save other values of lookup in SharePoint with others 

  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @Ashok2 ,

     

    Am so sorry that I had some mistakes in above formula, please try below:

    //create a new item in the list that the LookUp column look up in.
    Patch(YourLookUpList, Defaults(YourLookUpList), {ColumnLookedUp: TextInput.Text, OtherColumn1: ..., OtherColumn2: ...});
    If(Form.Mode = FormMode.New,
    //in new mode create a new item in this list.
     Patch(ThisList,Defaults(ThisList),{LookUpColumn: LookUp(Choices(ThisList.LookUpColumn), Value = TextInput.Text)}),
    //in other mode edit the selected item of this list.
     Patch(ThisList, Gallery.Selected ,{LookUpColumn: LookUp(Choices(ThisList.LookUpColumn), Value = TextInput.Text)})
    );
    //save other columns of this list
    SubmitForm(FormName)

     

    Besides, you will need to modify the formula in the Update property of the LookUp column Data Card:

    If(!IsBlank(DataCardValue.Selected.Value),DataCardValue.Selected)
    //DataCardValue is the name of the Combo box control inside this DataCard

     

    For the second question, what do you mean by "save other values of lookup in SharePoint with others"? Do you want to update items of 2 different lists within 1 Form? You may see other columns have been added into the first Patch function of my updated formula.

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • lama1 Profile Picture
    2 on at

    i have an textinput and submit bottom and a have two list users and income , the users list is have a title , and the income has a lookup column from title named username_fk , i want to create registration page that save the title and username_fk "lookup" in on submit bottom  , any one please help me i am in trouble @Ashok2 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard