cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
PowerTomas
Level: Powered On

Html Text Convert to PDF with two diffrent gallerys

Hey Team!

 

I have just watch Shane youngs video about creating htmltext and put it to sharepoint as PDF.

I want to create a htmltext.

I have one gallery called Appointmentgallery. Every appointment have one or more activites that is linked to it.  I have created a field in the activitylist that is called MasterID. The masterID is the same as Appointment ID (MasterID = ID) so thats how i can filter the gallerys depends witch appointment i want to look at.

 

But is it possible to create a htmltext with All the appointment and activities on the same pdf? 

I want to have a pdf like this for example:

 

Appointment 1 

Description: xxxxxxxxxx

Activities (Linked to Appointment 1)

Activity 1

Activity 2

 

Appointment 2

Description: xxxxxxxxxx

Activities (Linked to Appointment 2)

Activity 1

Activity 2

 

"&Concat(AppointmentGallery.AllItems, "<strong> AppDescription: </strong>" & 'DesriptionText' & "<br>"&Concat(ActivityGallery.AllItems , "<strong> Start: </strong>" & Start ,"<br><br> ") , "<br><br>")&"

 

This is my code atm. But now its listing all the activities for every appointment. I want like a filter that each appointment will only show its activity thats linked to it.
i think this is the code that must have like a filter. So its only showing the activities that have the same MasterID like ID.

"&Concat(ActivityGallery.AllItems 

 

Does anyone have any suggestions?

Just ask me if something is unclear.

 

Regards

PT

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Html Text Convert to PDF with two diffrent gallerys

Hi @PowerTomas ,

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned.

 

Please use your Collection data source within the Concat function rather than Gallery.AllItems formula. Modify your formula as below:

..."&Concat(AppointmentCollection, "<strong> AppDescription: </strong>" & 'DesriptionText' & "<br>"&
Concat(
       Filter(ActivityCollection, MasterID = AppointmentCollection[@ID]), 
      "<strong> Start: </strong>" & Start , "<br><br> "
), 
"<br><br>")&"...

Please take a try with above solution, check if the issue is fixed.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Community Support Team
Community Support Team

Re: Html Text Convert to PDF with two diffrent gallerys

Hi @PowerTomas ,

Do you want to list available related activities for each Appointment within your HTML text?

 

Based on the needs that you mentioned, I think the Filter function could achieve your needs. I have made a test on my side, please consider modify your formula as below:

"&Concat(AppointmentGallery.AllItems, "<strong> AppDescription: </strong>" & 'DesriptionText' & "<br>"&
Concat(
Filter(ActivityGallery.AllItems, MasterID = ID),
"<strong> Start: </strong>" & Start , "<br><br> "
),
"<br><br>")&"

Please consider modify your formula as above, then check if the if the issue is solved.

 

More details about the Filter function in PowerApps, please check the following article:

Filter function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PowerTomas
Level: Powered On

Re: Html Text Convert to PDF with two diffrent gallerys

Hey @v-xida-msft!


Yes thats my question, i want to show the related activites on each appointment in the same htmltext.

I have tried this code but it lists only the first activity of the Appointment 1 for every appointment.

Did it work for you with this code?

How did you do with the galleries? Did you create a collection from your SP list and put it into a gallery or did you connected your SP list directly to your Gallery?

 

Regards

Tomas

Community Support Team
Community Support Team

Re: Html Text Convert to PDF with two diffrent gallerys

Hi @PowerTomas ,

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned.

 

Please use your Collection data source within the Concat function rather than Gallery.AllItems formula. Modify your formula as below:

..."&Concat(AppointmentCollection, "<strong> AppDescription: </strong>" & 'DesriptionText' & "<br>"&
Concat(
       Filter(ActivityCollection, MasterID = AppointmentCollection[@ID]), 
      "<strong> Start: </strong>" & Start , "<br><br> "
), 
"<br><br>")&"...

Please take a try with above solution, check if the issue is fixed.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

PowerTomas
Level: Powered On

Re: Html Text Convert to PDF with two diffrent gallerys

Hi @v-xida-msft!

 

It seems to work fine!

But i used Allitems cause i got a Dropdown filter on the gallery so i can decide witch appointments i want to have in the HTMLtext. With Allitems i only get the appointments that shows in the gallery after my DDfilter.

Now i get every appointment.

Is it possible to first filter the gallery and then reflect to the HTMLtext where we filter so activitys and appointment are on the right spot.

 

Regards 

Tomas 

 

 

 

Community Support Team
Community Support Team

Re: Html Text Convert to PDF with two diffrent gallerys

Hi @PowerTomas ,

Is the solution I provided above helpful in your scenario?

 

If you have solved your problem, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.

 

For your question, why not put your Dropdown Filter condiftion to your HTML text directly? You could consider apply your Dropdown filter to your HTML text directly like below:

..."&Concat(Filter(AppointmentCollection, FilteredColumn = DropdownBox.Selected.Value), "<strong> AppDescription: </strong>" & 'DesriptionText' & "<br>"&
Concat(
       Filter(ActivityCollection, MasterID = AppointmentCollection[@ID]), 
      "<strong> Start: </strong>" & Start , "<br><br> "
), 
"<br><br>")&"...

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PowerTomas
Level: Powered On

Re: Html Text Convert to PDF with two diffrent gallerys

Hey @v-xida-msft 

 

This is exactly what im looking for, but when i tried your latest code on this row the "=" is red marked and the error message is Invalid argument type.

Did you get the same message?

Filter(ActivityCollection, MasterID = AppointmentCollection[@ID]), 

 Best Regards

Tomas

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 404 members 4,594 guests
Please welcome our newest community members: