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 / Formula using input fi...
Power Apps
Answered

Formula using input fields and datasource records

(0) ShareShare
ReportReport
Posted on by 6

I have a data source:

JRitt_1-1711561084258.png

 

I have two input fields

1. text field 'PageCount'

2. Drop Down Menu 'Paper', which pulls the options from the Paper Type column in the data source

 

I'd like to have a text field that would then display the results of a formula. Something like this...

If(Paper='70# Offset', Sum(PageCount/field at Pages Per Inch, 70# Offset)

 

How do I refence that specific field in the formula? Ultimately, I need to divide page count by the "pages per inch" for the paper that was selected in the drop down.

 

thanks

Categories:
I have the same question (0)
  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @JRitt ,

     

    Try using following code:

    With(
     {
     pageCountValue: Value(PageCount.Text),
     pagePerInch: LookUp(PaperData, 'Paper Type' = PaperDropdown.Selected.Value, ThisRecord.'Page Per Inch')
     },
     If(
     !IsBlank(pagePerInch),
     pageCountValue/pagePerInch
     )
    )

    replace if any mis-spelled names

     

    Hope this helps

  • JRitt Profile Picture
    6 on at

    Hi @Ethan_R 

     

    That makes a lot of sense! A much better way to do it.

     

    It's close, but doesn't like some of the code.

    JRitt_0-1711628686550.png

     

    The error for the '=' is:

    Incompatible types for comparison. These types can't be compared: Text, Error.

     

    The error for the ".Value" is:

    Name isn't valid. 'Value' isn't recognized.

     

    I think if we can get that link made between PaperDropdown and the Paper Type column in the data we'll be good.

     

    thanks so much

    Josh

  • Verified answer
    Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @JRitt ,

     

    That's fine, usually .Value is given when there's no internal columns within. 

    In your case, there are internal columns meaning that it is a record in your dropdown.

     

    So, replace '.Value' with '.<columnName>' 

    I'm not sure which columns you have but in PowerApps formula bar, you add "." dot and PowerApps suggestions will show you fields it holds.

     

    Note: Add it with the same datatype by which it is comparing.

    It will work

     

    Hope this helps

  • JRitt Profile Picture
    6 on at

    @Ethan_R 

     

    perfect, working wonderfully now. thanks!

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard