web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Display "Last" items i...
Power Apps
Answered

Display "Last" items in SP "table (choice)" column

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi there,

 

I am trying to use a view table to show some of the data from the most recent entry in a SP list. Seems like it would be straight forward and the formula Last(SPListName).Attribute works perfectly for text column (see List 1 image attached), but i cannot seem to get it to work for a choice column (see List2 image attached). Any ideas?

 

Thanks

Last2.JPG
Last 1.JPG
Categories:
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Firstly,let me explain why you encounted this problem.

    The value of Last(……).'Ohysical Hazards' is a table which can not be displayed in a label control.

    Secondly,please try this code:

    "Hazard Summary" & Concat(Lase('Change Management Master List').'Physical Hazards'),Value,";")

    Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Bof,

     

    Thanks for your reply.  I tried it, but no luck - please see attached.  What am i doing wrong????

     

    C

    Haz3.JPG
  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    @Anonymous ,

    You are missing a closing bracket off the end of the code in your picture. I think you should find that 

    "Hazard Summary" & Last('Change Management Master List').'Physical Hazards'.Value

    should also work.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    Hi @Anonymous ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks, but still no dice - says it wont work because the data type is a table.

  • Verified answer
    WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    Hi @Anonymous ,

    Is the 'Physical Hazards' field a multi-choice - if so try the below

    "Hazard Summary" & 
    Concat(
     Last(
     'Change Management Master List'
     ).'Physical Hazards',
     Value & ","
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You nailed it Warren!  Awesome!  Thankyou!  

    One more quick question - what is the strucuture of the formula if i have multiple fields i want to display eg 'chemical hazards' etc?

  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    Hi @Anonymous ,

    Something like - the Char(10) is just a new line.

    "Hazard Summary" & char(10) & 
    Physical Hadards" & char(10) & 
    Concat(
     Last(
     'Change Management Master List'
     ).'Physical Hazards',
     Value & ","
    ) & char(10) & 
    Chemical Hadards" & char(10) & 
    Concat(
     Last(
     'Change Management Master List'
     ).'Chemical Hazards',
     Value & ","
    )

    if you want to get rid of the last commas - you can try

    With(
     {
     vPhysical:
     Concat(
     Last(
     'Change Management Master List'
     ).'Physical Hazards',
     Value & ", "
     ),
     vChemical:
     Concat(
     Last(
     'Change Management Master List'
     ).'Chemical Hazards',
     Value & ", "
     )
     },
     "Hazard Summary" & char(10) & 
     Physical Hadards" & char(10) & 
     Left(
     vPhysical,
     Len(vPhysical)-2
     ) & char(10) & 
     Chemical Hadards" & char(10) & 
     Left(
     vChemical
     Len(vChemical)-2
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    yep, ended up figuring it out!  Thanks 🙂

  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    No problems @Anonymous ,

    Happy to help

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard