cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
TBuente
Level 8

Storing many values as a "Template"

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.

1 ACCEPTED SOLUTION

Accepted Solutions
EricLott
Level 10

Re: Storing many values as a "Template"

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.

View solution in original post

7 REPLIES 7
EricLott
Level 10

Re: Storing many values as a "Template"

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
Level 8

Re: Storing many values as a "Template"

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?

EricLott
Level 10

Re: Storing many values as a "Template"

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
Level 8

Re: Storing many values as a "Template"

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.

EricLott
Level 10

Re: Storing many values as a "Template"

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
Level 8

Re: Storing many values as a "Template"

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.

EricLott
Level 10

Re: Storing many values as a "Template"

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.

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,071)