Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Extending Microsoft Power Apps with Power Apps Component Framework

You're reading from   Extending Microsoft Power Apps with Power Apps Component Framework A complete guide to creating, deploying, and improving your code components

Arrow left icon
Product type Paperback
Published in Feb 2021
Publisher Packt
ISBN-13 9781800564916
Length 318 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Danish Naglekar Danish Naglekar
Author Profile Icon Danish Naglekar
Danish Naglekar
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: Fundamentals of the Power Apps Component Framework
2. Chapter 1: Introduction to the Power Apps Component Framework FREE CHAPTER 3. Chapter 2: Power Apps CLI 4. Chapter 3: Community Tools and Resources 5. Chapter 4: Project Overview and the Component Life Cycle 6. Section 2: Building and Managing Code Components
7. Chapter 5: Code, Test, and Repeat 8. Chapter 6: Debugging Code Components 9. Chapter 7: Authentication Profiles 10. Chapter 8: Introduction to the Dataverse Project 11. Chapter 9: Configuring Code Components in Power Apps 12. Section 3: Enhancing Code Components and Your Development Experience
13. Chapter 10: Diving Deep into the Features Provided by PCF 14. Chapter 11: Creating Advanced Dataset Code Components 15. Chapter 12: Enriching Your Dev Experience 16. Answers to Knowledge Tests 17. Other Books You May Enjoy

Understanding the technique to open a record from a dataset

The current out-of-the-box sub-grid allows you to open a record when you double-click on it and shows a hyperlink to the lookups, which makes it more user-friendly. But when you create code components, you have to implement these features on your own and it will vary based on the design of your code component.

Let's expand our code component that will show a hyperlink on the primary field and lookups, which when clicked will open those records. We will update the createCardItems method to check whether the datatype of the column is a lookup or primary field, then add a class that will display this record differently than all other records. The following is the updated code snippet on the createCardItems method:

index.ts

if (columnItems.dataType.startsWith('Lookup.') ||   columnItems.isPrimary) {

    content.classList.add("gridText", "gridTextLookup&quot...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime