Power Apps Exchange

Please login or click SIGN UP FOR FREE to create your PowerAppsUG account to join this user group.
Expand all | Collapse all

Lookup function syntax

  • 1.  Lookup function syntax

    Posted 6 days ago
    Edited by Wendell Simmons 6 days ago
    HI, Here is a version of a simple Lookup function I want to use in an embedded canvas app:

    LookUp('LOS Versions','Status (LOS Versions)'='Status (LOS Versions)'.Active).'LOS Text'

    ...where LOS Versions is a table with two fields, status and LOS Text. My challenge is that regardless of my evaluation arguments I get a Delegation warning message.


    Tell me I'm missing something super simple.

    ------------------------------
    Wendell Simmons
    Partner
    ------------------------------


  • 2.  RE: Lookup function syntax

    Top Contributor
    Posted 6 days ago
    Is your Status column a lookup column, choice column etc, or just text?

    ------------------------------
    Will Page
    Technical consultant
    Christchurch, NZ
    ------------------------------



  • 3.  RE: Lookup function syntax

    Top Contributor
    Posted 5 days ago
    Hi @Wendell Simmons,
    You do not need to repeat the 'Status(LOS Versions)', although I suspect this is a Lookup column? However if it is Text and you are after "Active", you ​would do this
    LookUp(
       'LOS Versions',
       'Status (LOS Versions)'="Active"
    ).'LOS Text'​



    ------------------------------
    Warren Belz
    Queensland Australia
    ------------------------------



  • 4.  RE: Lookup function syntax

    Posted 5 days ago
    Thanks for the feedback.  The Status field in this case is the record's statecode optionset. BTW is there anywhere online with examples of different comparison expressions using data types beyond numeric and strings? Once I solve this comparsion involving an optionset, my next hurdle will be evaluating an optionset value against a multiselect optionset, i.e., is a selected picklist value found in a multiselect picklist? I'm sure that'll be quite quirky formulate correctly.

    But on the issue at hand I'm just trying to determine if the record is Active or Inactive.

    ------------------------------
    Wendell Simmons
    Partner
    ------------------------------



  • 5.  RE: Lookup function syntax

    Posted 5 days ago
    PROGRESS! This line will return Active records correctly:

    LookUp('LOS Versions', 'Status (LOS Versions)'.Active=statecode ,'LOS Text')

    Now I'm trying to get the syntax right to determine if a multiselect field contains a specific value held in a simple optionset:

    Lookup('table', optionset.value in multiselectoptionset, returnedfield)

    ------------------------------
    Wendell Simmons
    Partner
    ------------------------------



  • 6.  RE: Lookup function syntax

    Top Contributor
    Posted 5 days ago
    Edited by Warren Belz 5 days ago
    Hi @Wendell Simmons,
    You are using DataVerse - I assumed SharePoint.
    Option Sets are not the easiest things to work with from my understanding (I am a SharePoint user), however I have referred a number of people to this article​ and this document which at times has resolved the issue.

    ------------------------------
    Warren Belz
    Queensland Australia
    ------------------------------