cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted

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
Highlighted
Community Support
Community Support

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.
Highlighted

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

Highlighted

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

Highlighted

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 

 

 

 

Highlighted

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.
Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,571)