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 / Model Driven App probl...
Power Apps
Unanswered

Model Driven App problem with formula column

(0) ShareShare
ReportReport
Posted on by

 

I have created a model driven app with two tables.   One is called  new_Contracts and the other is called  new_ContractsExtensionOptions.    There is a lookup field  to the new_ContractsExtensionOptions to the new_Contracts table.   A record in the new_Contracts table can have several related records in the  The new_ContractExtensionOptions table.   I want to create a new column in the new_Contract Table that looks at all the related records in the new_ContractExtensionOptions table and returns the latest extension date from a  field called new_EndDate in the new_ContractExtensionOptions table.   However if there are no contract extension option records in the new_ContractsExtensionOPtions table, I want the value to be returned to be the new_InitialContractEndDate which is a column/Field in the new_Contracts table.      I have a lookup/relationship  that is a one to many from the new_Contracts table to the new_ContractsExtensionOptions table but when I try  adding a column using the fx formula option it keeps throwing up errors and doesn't seem to identify or see the related table for me to reference it in the formula.     I don't know what I'm doing wrong or if there are some setting that need to be applied to use the formula function.    I've tried using the formula function in one of the tables and it just keeps throwing out errors that it doesn't recognise FILTER or MAX or the syntax.   Help i've been trying to figure this out for two days.        

If(
 IsBlank(
 Lookup(
 'new_ContractsExtensionOptions',
 'new_Contracts',
 new_ContractsExtensionOptions.new_ContractId = new_Contracts.new_ContractId,
 new_EndDate,
 Descending
 )
 ),
 new_InitialContractEndDate,
 Lookup(
 'new_ContractsExtensionOptions',
 'new_Contracts',
 new_ContractsExtensionOptions.new_ContractId = new_Contracts.new_ContractId,
 new_EndDate,
 Descending
 )
)
Categories:
  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Hello,

    I'm afraid you will have to look for an alternative way to implement your requirements.

    Here is the list of functions that are available for "Formula Fields" - https://learn.microsoft.com/en-us/power-apps/maker/data-platform/formula-columns?tabs=type-or-paste#functions and LookUp is not one of those.

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 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard