Skip to main content

Dynamically Setting Object Properties in Power Apps Based on a SharePoint List

  • Chapter
  • First Online:
Creating Business Applications with Microsoft 365
  • 1048 Accesses

Abstract

This chapter focuses on some techniques needed to build a “wizard” type of system where the user selects a topic and then is presented with a set of steps to perform the task or submit a request. To make this work effectively, we want to store the Actions and associated steps externally (SharePoint in this case). This keeps us from having to edit and republish our application whenever we add or delete Actions. For this to work, though, we need to be able to dynamically set button text and load each step as we go along. More specifically, we have an indefinite number of Actions that in turn have some number of steps, each with information and possibly attachments. Getting this all working gives us the building blocks that we would need to create the rest of the system.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    For our real application, we would navigate to the StepsScreen when clicking any of the buttons.

  2. 2.

    OnStart is a good place to initialize code as it runs automatically when you begin the application. Note that you don’t want to put non-essential code here though, as this code will run completely before the first screen of your app loads.

  3. 3.

    We will end up with four columns. Title, Description, and Order come from the Actions list. We then add ButtonRef from the AddColumns() command.

  4. 4.

    Very importantly, note that these are the object references and NOT the names of the buttons. So we need to create each of these buttons before writing this code.

  5. 5.

    We could have used the LookUp method to read in the ID, but in our case, we know the Title is unique.

  6. 6.

    Since we are filtering on a non-primary lookup column, we are subject to delegation limits. As long as we increase the limit to 2000 and don’t exceed that number of steps, we are OK. If we need more, we can make ID primary or use the technique for avoiding delegation issues from an earlier chapter.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Rhodes, J.M. (2022). Dynamically Setting Object Properties in Power Apps Based on a SharePoint List. In: Creating Business Applications with Microsoft 365. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-8823-8_16

Download citation

Publish with us

Policies and ethics