web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Create calculated column in power apps using c# code

(0) ShareShare
ReportReport
Posted on by 25

I have scenario to create calculated column (string, date or Number ) in power apps using c# code 
i used  bellow code but its creating normal string column only not calculated column. Please advice

var calculatedColumn = new StringAttributeMetadata

{

LogicalName = calculatedColumnName,

DisplayName = new Label(calculatedColumnName, 1033),

Description = new Label(calculatedColumnName, 1033),

EntityLogicalName = entityName,

ReturnType = new AttributeTypeCode?(AttributeTypeCode.String),

FormulaDefinition = calculatedColumnFormula 

)

I have the same question (0)
  • Suggested answer
    XM-22040801-0 Profile Picture
    11 on at

    Hello,

    Could you add SourceType and SourceTypeMask ?

    SourceType = 1 for calculated attribute.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 192 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 129

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans