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 / Function Help (infopat...
Power Apps
Answered

Function Help (infopath user)

(0) ShareShare
ReportReport
Posted on by 109

Hello, I'm new to PowerApps (come from InfoPath) and I'm used to rules instead of functions.

 

was wondering if you could help me figure out how I can have one field on my form lookup information in a SharePoint list where the value of my top field matches the value of a field in my SharePoint list and I want the rest of the fields that match from the field in the SharePoint list to auto populate the rest of my fields on my form.

 

does that make sense?

 

so far all I got to without an errors in the formula was here but I cant figure out how to get it to set the value of the other columns in the SharePoint site that match the value I want it to filter by?

 

so on change i put: Filter(ECS_HR_EMP2SQL, 'Emp#' = DataCardValue3.Text)

 

any of this makes sense? sorry I'm so use to InfoPath rules...

 

Also is there a good place to start learning functions form the ground up?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    Hi @Spassler ,

    I don't quite understand what you have posted, but this may be what you are after

    Filter(
     ECS_HR_EMP2SQL, 
     'Emp#' = DataCardValue3.Text ||
     YourField2 = DataCardValue3.Text ||
     YourField3 = DataCardValue3.Text ||
     YourField4 = DataCardValue3.Text
    )

     

    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.

  • Spassler Profile Picture
    109 on at

    @WarrenBelz ,

     

    Warren, ill try to explain it better.

     

    I have a SharePoint list with employee data. (ECS_HR_EMP2SQL) I also have another SharePoint list with a small form, and i have a data field called employee number and i want to type the emp number in said field and have it then reference the big list with employee data to auto populate other fields on the form for the matching user in the large list by there emp number.

     

    not sure if this will help you or confuse you more, but this is the example formula that info path used for the same type of command i'm looking for....

    xdXDocument:GetDOM("Employees")/dfs:myFields/dfs:dataFields/d_1:Employees/@DeptDist[../@Emp_ = xdXDocument:get-DOM()/my:myFields/my:EMployeeNumber]

  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    @Spassler ,

    Sorry - I am lost a bit from the point of view that

    Filter(
     ECS_HR_EMP2SQL, 
     'Emp#' = DataCardValue3.Text
    )

    would do this. The resulting Form if based on ECS_HR_EMP2SQL and selected from that Gallery filtered like this would have all the relevant fields in it - you do not need further filters - or am I missing something?

     

    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.

  • Spassler Profile Picture
    109 on at

    @WarrenBelz 

     

    Warren, you are probably not missing anything it is possible i'm using the wrong formula all together. I'm not a developer, i just got thrown into trying to use this so i'm literally brand new to this, and using functions all together. If you have an idea of what might work i'm all ears. i thought maybe i was using the right formula but since your so confused i'm thinking i'm not?

  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    Hi @Spassler ,

    I am trying to work out what you need - your requirements are

     auto populate other fields on the form for the matching user in the large list by there emp number.

    If you filter on your current code, you will get a list (I assume of one) of records matching the employee number. You could put this in a gallery and select it from there with the DataSource of  ECS_HR_EMP2SQL and the Item of YourGalleryName.Selected

    If you put this on a form with the same DataSource  and the Item of

     

    LookUp(
     ECS_HR_EMP2SQL, 
     'Emp#' = DataCardValue3.Text
    )

     

    you should get the record you are after and all fields will be available.

    If you are new to Power Apps, you really need to get your mind around some basic concepts, or you will struggle to write code and apply code in the appropriate places. Have a watch of this very good introductory video from @DavesTechTips before you attempt anything else.

     

    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.

  • Spassler Profile Picture
    109 on at

    @WarrenBelz 

     

    Warren, i haven't tried it yet, but thanks for the help and info. ill watch the video first then give it a go and let you know if it works. 

  • Spassler Profile Picture
    109 on at

    @WarrenBelz 

     

    Warren, so no luck, what I'm trying to do is fix where it says "where" not sure how to get the formula to work....

     

    Filter(ECS_HR_EMP2SQL, 'First Name' where 'Emp#' = DataCardValue3.Text)

     

    Here is a picture you can see the warning i'm getting?? the SharePoint database has 5347 items... is that why it doesn't work?

     

    Formula i was just trying was: Filter(ECS_HR_EMP2SQL, Concatenate('First Name'," ",'Last Name') || ('Emp#' = DataCardValue3.Text)

     

    Spassler_0-1598294777083.png

     

  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    @Spassler ,

    What are you trying to do with this

    Concatenate('First Name'," ",'Last Name') ||

    you have not stated what it has to equal.

  • Spassler Profile Picture
    109 on at

    @WarrenBelz 

    Warren i'm not sure i'm using the || correctly... i don't know what it means... I tried to re-do it a different way... but still no luck.

    nothing i seem to try populates the data its got to be the comma or some other trigger that i need there right?

     

    Spassler_0-1598304881483.png

     

     

     

  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    @Spassler ,

    Can you please explain what you are trying to do - you should be using a LookUp, not a Filter to get a single value for a text box and you have the Concat statement stuck in the middle of it not equalling anything. Just set out in logic what you are trying to achieve (If this equals that then I want those in the box and I am getting them from there).

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard