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 / Storing many values as...
Power Apps
Answered

Storing many values as a "Template"

(0) ShareShare
ReportReport
Posted on by 112

Hi all,

 

I am building an app that will allow users to create a PDF with many terms and definitions. This is useful for many people in my company, as they often need to search around for different common terms to complete their work. With this app, users will be able to select all of the terms they want, and print them out.

 

I am quite far into the development of this app; however have come to a stopping point when regarding the "Templates" option. 

 

In this app, I want users to be able to create a new PDF either from scratch (allowing them to select all of the terms themselves), or start from a template, where preset terms will be selected (users can add additional terms, the template just saves them time for common terms needed often). 

 

I have come to a stopping point within the "template management" section. I have create the ability for users creating a template (not a PDF) to select the desired terms to save into a template; however, I am running into a bit of trouble with deciding how to host these templates. Originally, I thought to make these templates store inside of my Excel database that I am utilizing to store the terms and definitions; however, I would have to make hundreds of columns (named Term1, Term2, Term3, Def 1, Def 2, Def 3, etc). These templates need to be stored and called upon easily (either for PDF creation, or editing the template itself).

 

Perhaps I may have to use an Excel database; however, I am stuck on how to display these pre-selected terms AND display the additional terms that are selected by users in ONE gallery. I believe I could use two galleries, and excel with hundreds of columns, but I would like to keep one gallery with a clean database.

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Just for clarification, do you have a table of terms and definitions yet? How do you want the data returned for the template? Do you want raw text of each term and definition in the template?

  • TBuente Profile Picture
    112 on at

    I do have a table for terms, definitions, categories, etc.

    I am looking for simple raw text, I just need to be able to show users what definitions they have selected to be in their template. I know I can do this via Excel with many columns, but I guess I am trying to only have "Term", "Definition", "Category", etc columns. I would like to be able to store preset "Groupings" of terms that can be called to populate a PDF form created by a user.

     

    Now that I think about it, if there is a way to create a new table upon template creation, this could work fairly well. Any suggestions on this?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yes, upon template creation, you can use Collect() to add a row to your Excel document. You can include the raw text for the template in that document like this:

    Template_IDTemplate_NameTerms_RAWDef_RAWCat_RAW
    1TestTemplate1Blah blah blahBlah blah blahBlah blah blah
    2Test Template 2Blah blah blahBlah blah blahBlah blah blah
    3Hello World TemplateBlah blah blahBlah blah blahBlah blah blah
  • TBuente Profile Picture
    112 on at

    So I do have a very similar table setup for templates, as I was testing some solutions; however, I would like multiple terms/definitions/categories to be display separately in a gallery.

    For instance, if I have this Excel table

     

    Template_IDTemplate_NameTerms_RAWDef_RAWCat_RAW
    1TestTemplate1Term 1, Term 2, Term 3Def 1,
    Def 2,
    Def 3,
    etc

    Cat 1,

    Cat 2, 

    etc

    2Test Template 2

    Term 1, Term 2, Term 3,

    Term 4,

    Def 1,
    Def 2, 
    etc

    Cat 1,

    Cat 2

    etc

    3Hello World Template

    Term 1, Term 2, Term 3, 

    Term 4, 

    Term 5,

    Term 6

    Def 1,
    Def 2,
    etc

    Cat 1,

    Cat 2, 

    Etc

     

    I am having troubles displaying these terms/defs/cats individually in a gallery.

    I am trying to display these in a gallery like so:

     

    Term1

    Cat 1

    Def 1

    Term 2

    Cat 2

    Def 2

    Term 3

    Cat 3

    Def 3

     

     

    Apologies if this is what you meant by your previous reply.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I see. It seems like you may need to set up a relationship like this:

    help.png

    Where templates are created and named, then there's a table where template IDs can be related to any number of term_ids, which are related to definitions and categories. I hope I've got that structure correct.

    Does that make sense?

  • TBuente Profile Picture
    112 on at

    How would you recommend creating this relational database? Using SQL, CDS, or do you recommend another method? I am pretty new to PowerApps, so please forgive my confusion.

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Whatever you prefer. You could do it in SharePoint or SQL. I'm not too familiar with the CDS, but I'm sure that would work as well.

    The relationships can be defined in PowerApps using AddColumns() as seen here. 

    ---
    If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard