In a previous post, we looked at how to use the PCF.Gallery site to install custom PCF components when a solution has been provided by the developer in GitHub. In some cases, the solution.zip file may not exist. Let’s look at how to deploy these components to an org so we can use them. Note you will need to go through these instructions here to set up your PowerApps Component Framework environment:
Let’s look at the Colorful Optionset Grid by Diana Birkelbach. Click on Download:
This takes us to the GitHub repo for the control. select Code->Download ZIP (or you can clone this project):
This downloads the PCF Controls:
Unblock the ZIP if you need to, then extract the files and copy to somewhere you can build your components, now open VS code to the YouTube directory, and open the terminal (Diana has such attention to detail she even has a .vscode setting to set the colors of the project!):
Now run
npm install
Now you can deploy to your org using one of a few ways.
You can deploy via solutions (managed or unmanaged), or you can deploy using:
pac pcf push --publisher-prefix <publisher prefix>
We will deploy using pac pcf push:
Now, when we go into our org, we can bind this to a dataset view, in our case we will bind it to an Account view. Let’s open the Account table in the classic interface:
And we will add control:
And let’s select the ColorfulOptionSetGrid:
Now we need to set where this control will be displayed, and then set any properties required:
Scrolling down we see many more items we can customize:
If I edit Optionset 1, I can select a field that I want to apply this colorful option set to. I’m going to select the Industry field:
Make sure the option set you use has colors defined for the options, and if not, add them:
Let’s save and publish, and see what this looks like. In My Accounts view, I have the Industry field, and we can see the colorful option set is displayed!
I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.
IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.
THANK YOU, AND LET'S KEEP LEARNING TOGETHER.
CARL