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 / Code Optimization Tech...
Power Apps
Answered

Code Optimization Techniques

(0) ShareShare
ReportReport
Posted on by 314

Is there a way to shorten and speed up this code to reduce the number of variables required?

ClearCollect(
colPendingRecord0,
ShowColumns(
'Sign-Off Records',
ID,
Document_Title,
Document_Number,
Dcoument_Link,
Status,
SDSRequestID,
Sign_Off_People,
EmailAddressAlias,
Title,
Created
)
);
ClearCollect(
colPendingRecord1,
AddColumns(
colPendingRecord0,
'Document Title',
Document_Title.Value,
'Document Number',
Document_Number.Value,
'Sign Off People',
Sign_Off_People.DisplayName,
'Request',
"View Document",
EmailAlias,
EmailAddressAlias.Email,
Action,
"Sign Off"
)
);

ClearCollect(
colPendingRecord,
ShowColumns(
colPendingRecord1,
'Document Title',
'Document Number',
'Sign Off People',
'Request',
EmailAlias,
Action,
)
);

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @usaman45 ,

    Something like this

    ClearCollect(
     colPendingRecord,
     ShowColumns(
     AddColumns(
     colPendingRecord1,
     DocumentTitle,
     Document_Title.Value,
     DocumentNumber,
     Document_Number.Value,
     SignOffPeople,
     Sign_Off_People.DisplayName,
     'Request',
     "View Document",
     EmailAlias,
     EmailAddressAlias.Email,
     Action,
     "Sign Off"
     ),
     DocumentTitle,
     DocumentNumber,
     SignOffPeople,
     Request,
     EmailAlias,
     Action
     )
    );

     

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard