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 / Setting default on a t...
Power Apps
Answered

Setting default on a text input field using a lookup to a SharePoint list

(0) ShareShare
ReportReport
Posted on by 97

Hi all

 

Datasource for app is a SharePoint site

I have a SPO list with columns DLA Name, DLAMinAmount, DLAMaxAmount

This specifies who can approve something depending the value amount.

I am trying to set the text for TextInputDLAPath to the DLA Name from the SPO list depending on the value in DataCardValueNetBookValue field.. Unfortunately I am not able to get it to work. Any assistance would be greatly appreciated.

 

Sample list

 

DLA NameDLAMinAmountDLAMaxAmount
Board5000001100000000
CFO1000015000000

 

Example

DataCardValueNetBookValue = 100500

 

Therefore the text of TextInputDLAPath would be "CFO"

 

This is what I have so far on the On Change property of DataCardValueNetBookValue:


TextInputDLAPath.Text = If(First(CurrentRecord).'Net Book Value' = 0 Or First(CurrentRecord).'Net Book Value' <= 50000 Or IsBlank(DataCardValueNetBookValue.Text), "Group Fin Controller",
LookUp('Disposal Approval Matrix', DLAMinAmount >= First(CurrentRecord).'Net Book Value' And DLAMaxAmount <= First(CurrentRecord).'Net Book Value'
).'DLA Name'
)
Categories:
  • alaabitar Profile Picture
    1,503 Super User 2024 Season 1 on at

    Hello @eddoria ,

     

    So for this to work you need to assign a variable to the default property of your TextInputDLAPath and then on the onchange event of your DataCardValueNetBookValue assign a value to this variable.

    So for example :

    DEfault property of TextInputDLAPath : _defaultValue

    Onchange property of DataCardValueNetBookValue : 

    If(First(CurrentRecord).'Net Book Value' = 0 Or First(CurrentRecord).'Net Book Value' <= 50000 Or IsBlank(DataCardValueNetBookValue.Text), Set(_defaultValue,"Group Fin Controller"),Set(_defaultValue,
    LookUp('Disposal Approval Matrix', DLAMinAmount >= First(CurrentRecord).'Net Book Value' And DLAMaxAmount <= First(CurrentRecord).'Net Book Value'
    ).'DLA Name')
    )
     
    Best regards,
    Alaa
  • Verified answer
    WarrenBelz Profile Picture
    156,732 Most Valuable Professional on at

    Hi @eddoria ,

    That should actually resolve as the Text of your TextInputDLAPath Label (you do not need OnChange events here) - this can be tidied up to 

    With(
     {wValue: First(CurrentRecord).'Net Book Value'},
     If(
     Len(DataCardValueNetBookValue.Text) = 0 ||
     wValue <= 50000, 
     "Group Fin Controller",
     LookUp(
     'Disposal Approval Matrix', 
     DLAMinAmount >= wValue && 
     DLAMaxAmount <= wValue
     ).'DLA Name'
     )
    )

    however I am not totally clear on your logic - if there is input in DataCardValueNetBookValue, where do you test for it ?

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard