Forum Academy Marketplace Showcase Pricing Features

Help with PDF Generation with two RG's with different content

Hi there,

I am trying to create a pdf and email the link of the PDF to a user (using the selectPDF plugin). I have read all the posts and cannot find a solution to this. Here is what I have done:

The application allows users to log their time (Time Log thing) and leave (Leave thing).

Time Logs thing:

Date/Time From
Date/Time To
Lunch Time

The fields above are used to calculate total billable time and a few other calculations.

Leave thing:

Date/Time From
Date/Time To
Leave Reason (Annual Leave etc.)

From the index page the user can create a new timesheet which should contain a RG of all Time Log things and Leave records based on a Date From and Date To selection.

I am a bit stuck on sending this data to the PDF page so that the RG’s (Time Log RG, Leave RG) only displays the timelogs and leave for the specified period on the PDF page.

Screenshots of page and workflows:

I am using the following things on the PDF Page and RGs:

User
Time Logs
Leave

Any assistance would be greatly appreciated.

Regards,
Pieter

Hide 2 groups one called start date and one called finish date on the pdf page, In your create time sheet workflow set the state of group start date (make a new state called data) as datetime pickers start date then do the same for group finish date changing the datetime picker to end date… now on your pdf page anywhere that data is shown add the constraint start date > group start dates “data” and finish date < group finish dates “data”.

Hi @jarrad

Thank you for the response.

I have created the hidden group but not too sure how to set the ‘data’ state to the group. Also, the datetime picker is on a different page than the page the pdf needs to be generated on, would this be an issue?

Thanks again for the assistance.

Regards,
Pieter

So in the work flow for the create time sheet button is where you want to add the 2 set states. Should be fine even on another page…

So add an action in the workflow for create timesheet, the action you want is set state, make the in the dropdown for choose element you want to set the state of pick date_to_hidden_group and choose state to be data then value to be datetime picker to’s value.

Your image shows you trying to set the state of the group that this workflow will set. leave those conditions alone if your on the pdf page the workflow actions will be what sets that state.

After that continue with the constraints as mentioned. Just to confirm that hidden group is on the pdf page isnt it?

By the way, the state data is just a state name… you can name it whatever you choose it doesnt matter… im making this point so you get your head around how a state can open a massive list of opportunities. You can set the state of almost anything and then condition or modify almost anything based on the state.

CONFIRMED THIS DOESN’T WORK! & NEITHER DOES SENDING DATES AS PARAMETERS!

Thanks @jarrad

I think I have wrapped my head around what needs to be done however I cannot select the date_to_hidden_group from the create timesheet workflow.

Thanks again!

Ok ive have a look and your right you cant set an element on another page… forgive me but i spend a lot of time working on single page many groups kind of stuff.

the good news is i have created you a demo app to show you how to do it among a few counter time things on the pdf page incase you have not yet worked out how to do it. everything you need to know i have written on the page.

go here to see it live: https://timesheet-send-data.bubbleapps.io/

go here to open the edit version: https://bubble.io/page?type=page&name=pdf_page&version=test&id=timesheet-send-data&tab=tabs-1

hope that helps you out.