Getting a option set field value from a collection

  • Getting a option set field value from a collection

    Posted by DSC Communities on April 16, 2020 at 8:01 pm
    • Jack Kao

      Member

      April 16, 2020 at 8:01 PM

      Hi Everyone,

      Currently I have a collection that is populated with a single record from a Common Data Service entity. On my page I have a couple of labels that display fields from that collection. For example in my entity I have a field called ‘Description’. Currently I can show this on the PowerApps page via the formula:Ā First(Collection_Name).Description. But when I try to apply the same formula to a field that came from an option set, I’m getting a data type is not supported for evaluation error. I was wondering if there was a way to display a field from a collection that originally came from an option set field in a CDS entity.

      Thanks!

      ——————————
      Jack Kao
      ——————————

    • Luc Vandael

      Member

      April 17, 2020 at 5:03 AM

      Hi Jack,
      What helped me in using option set and lookup values from PowerApps is the realization that the “references” used are not fields but entities on their own.

      So First(Collection_Name).YourOptionSet.Value should be possible.

      An Example:Ā First(colInvoiceHeaders).Currency.’Currency Name’

      ——————————
      Luc Vandael
      Business Analyst
      Tomra
      Haasrode
      ——————————
      ——————————————-

    • Mark Pearson

      Member

      April 17, 2020 at 4:10 PM

      Are you using the same filter that you use for the collection? The Collection is a result so unless there is only one row in the source it would need a filter to get that result.Ā  So is the label. text something like:Ā  First(Filter(source,Col-?)).Description

      ——————————
      Mark Pearson
      National Operations Manager
      61409321547
      ——————————
      ——————————————-

    DSC Communities replied 5 years, 11 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘Getting a option set field value from a collection’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!