What's new in Power Platform? - Ep 3

What's new in Power Platform? - Ep 3

Welcome to the Episode 3 of What's new in Power Platform?

Before diving into the new feature, I'd like to introduce myself. I am Stuart Baxter, Power Platform Solution Architect at Kerv Digital . I've been working with Microsoft technologies for almost 8 years and have spent the last 4 working with Power Platform. I enjoy building creative solutions for our customers using the latest features.

In this episode we will be looking at Cards for Power Apps (Preview)


Before we dive into how to use the function, you should be aware that this is a preview feature. Preview features aren't meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.


Enabling Cards

This feature is automatically available for makers, and can be found in the left menu on https://make.powerapps.com


Getting Started

After selecting Cards from the left menu, you will be presented with this screen.

Screenshot of Cards menu

from here you can click Create a card, or view relevant Learning resources


Creating your first card

As functionality is limited during public preview, we will create a very simple card.

The user will enter the name of a Pokémon - and the card will respond with an image of the Pokémon taken from a Dataverse table.

screenshot of first page of card with label and text input
screenshot of second screen of card with image of Pikachu

User Entry Screen

On this screen we will add a label instructing users to Enter a "Pokémon Name in lower case".

We will then add a text input to hold the user's selection - and finally a button to capture the selection in a variable and pass it to the next screen for processing.

Cards are slightly different from canvas apps in that you need to set up variables as opposed to just using Set(var_something,"something"). Setup is fairly simple stuff, simply select variables from the left menu, click new variable and complete the pop out form

Screenshot of new variable pop-out menu

Now that we have configured our variable, we can use our button to set the value of it, then navigate to the next screen ("Pokémon Details").

Set(ChosenPokemon,txt_selected);?Navigate('Pokémon?Details')        

Another key difference to bear in mind is that when getting the value from a text input, we do not need to add ".text" onto the end.

Now that we have passed our selected Pokémon to the next screen, we want to display this on our card, as this is held in a variable, we can simply refer to it.


ChosenPokemon        

To get our image, we need to pass in a URL using this Power FX formula in the URL field of our image control.


=LookUp(new_capturedpokemon,Name=ChosenPokemon).'Front Sprite'        

The format of our lookup is slightly different from a traditional canvas app in that we need to use the table logical name (as opposed to display name) - in our case "new_capturedpokemon".

Limitations of Power FX in Cards

At the moment, only a few power FX functions are usable in cards

  • Set - used for setting variable, the variable must exist before you can set it (see above)
  • Collect - used for collecting data to a table, a variable of type "Table" must exist before you can collect (see above).
  • Documentation seems to suggest use of Viewer() as opposed to User() - however on testing this does not appear to be operational yet.
  • An up-to-date list of supported Power FX functions can be found here


Card Layout

Now that we have the data we want, we can add some flourishes to make the card look nicer.

Screenshot of insert menu

A few points to note:

  • A container takes on the properties of the first control placed inside it. Only controls of the same type can be added to a container.
  • Button Sets are containers that can only hold buttons. Buttons can be placed inside or outside of Button sets
  • Image sets are containers that can only hold images. Images can be held inside or outside of Image sets.
  • Fact sets hold key-value pairs - I haven't quite figured out what this could be used for but will update later.
  • Column sets are a container for columns. Columns must be entered into a column set

Sending Cards to Teams

Documentation seems to suggest that clicking the play button, followed by send would generate a link, which can be pasted into a chat and would display the card - this does not seem to work when I tried but may be as a result of me building the card in a developer environment.

This is the expected outcome:

Screenshot of a card sent to Teams

Conclusion

Overall, customisation options are limited compared to a traditional canvas app or adaptive card, but I guess this is to be expected as the functionality is in public preview.

I hope you enjoyed this episode of What's new in Power Platform - please join us again next week where I'll be diving into another great new feature!

To keep up to date with the latest posts, please follow me or What's new in Power Platform blog

#powerplatform #powerapps #poweraddicts #lowcodenocode #WNIPP

要查看或添加评论,请登录

社区洞察

其他会员也浏览了