cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dexter_Oz
New Member

Fetch value from SharePoint list Column based on value entered in form

I have a requirement to build a power apps forms on SharePoint list

 

Two columns

Column A , Column B

 

On Power Apps

when user fills in value to Column A in power app form in the background i want to check if that value already is there on the list then show value of Column B in another text box.

 

What approach can be used to auto populate the value after value is filled on column a.

 

Note Column A can not be drop down as if value does not exists then it needs to entered.

 

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @Dexter_Oz ,

I will call the field as you have ColumnA .

Also the the text boxes TextBoxA and TestBoxB and the data source of Column A ListA.

If I understand you correctly, user enters something in TextBoxA and if in ListA in ColumnA, it should auto populate TextBoxB

So starting with the OnChange property of TextBoxA

UpdateContext(
   {
      vInList:
      Lookup(
          ListA,
          ColumnA = TextBoxA.Text,
          ColumnA
      )
   }
);
If(
   !isBlank(vInList),
   Reset(TextBoxB)
)
      

On the Default of TextBoxB

If(
  !isBlank(vInList),
  vInlist,
  [Whatever it is now]
)

Substitute the bit in brackets with what the Default is now (without the brackets).

One last thing - on the screen OnVisible put

UpdateContext({vInList:Blank()})

 

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.

 

Thanks for looking into this and sharing valuable suggestion.

 

I used Search function on textbox with gallery output to show the output. That worked

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,864)