Discussions

 View Only
  • 1.  Create Child Record With Button From Embedded Table Report Link

    Posted 04-27-2022 12:56
    ERD
    I have a table of Weekly Work Plans where each Plan can have many Planned Activities.  Also shown on the form is an embedded report of Primavera P6 Schedule IDs filtered for tasks that are due to start in the next three calendar weeks.
    Form Example
    Currently users must take note of the Sched. ID they need, click the [ + Planned Act. ] button to add a Planned Activity, then find the Sched. ID in a dropdown list and save the record.  That's a lot of extra steps.

    I want the user to be able to review the list of Schedule IDs and click a button on the one they want to create a Planned Activity for, and subsequently have the record generate and the Sched. ID to be populated on it.

    The challenge is this, the button would be located on the Sched. ID record in the embedded report, and would not know record ID of the Weekly Plan needed for the API_GenAddRecordForm function.  The Record ID is available in the URL of the form, but I don't know how to grab it for the button without using JS.

    ------------------------------
    Jon Froderberg
    PRIME Developer
    Harder Mechanical Contractors
    https://www.harder.com
    Portland, OR
    801.946.0576
    ------------------------------


  • 2.  RE: Create Child Record With Button From Embedded Table Report Link

    Posted 04-27-2022 16:46
    I think you are correct that there would be no way to grab the Weekly Plan record ID to embed in the button, as the button exists only in the context of schedule IDs.
    You can however use a code page. In this case the button would direct to the code page with the parameter for the schedule ID as that is possible, then you can use JS to extract the weekly Plan ID from the referring URL, of course assuming that the button was clicked from within the weekly plan record page.
    You can then have the code page either redirect to the New Planned Activities form with both values prefilled or actually have the code page create the record and then redirect to the new activity in either read or edit mode.

    I've done something similar using combined buttons and code pages so if you think this would work for you let me know and i'll try to post a sample

    ------------------------------
    Simon H
    ------------------------------



  • 3.  RE: Create Child Record With Button From Embedded Table Report Link

    Posted 04-27-2022 17:03
    Hi Simon-
    I'm quite interested in seeing an example!  I'll share it with my team and hopefully we can arrive at something that will save our field personnel some clicks.

    ------------------------------
    Jon Froderberg
    PRIME Developer
    Harder Mechanical Contractors
    https://www.harder.com
    Portland, OR
    801.946.0576
    ------------------------------



  • 4.  RE: Create Child Record With Button From Embedded Table Report Link

    Posted 04-27-2022 17:08
    Jon,
    I am not sure exactly follow your question but if your situation is that you are sitting on a record and on that record are two embedded reports which are not related to the record you are sitting on, and you want something to happen when a button is clicked that requires knowledge of the record the user is sitting on then then I do have a solution which involves one click on the record you are sitting on.

    That click would record the record ID of the record that you were sitting on in a user focus table and that information would be available to any other tables in the app.  The concept could work for you it might save you from having to use code pages which are arguably more technical to maintain in the future.

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Create Child Record With Button From Embedded Table Report Link

    Posted 04-27-2022 17:22
    Hi Mark-
    The embedded table for Schedule IDs is a report link where the records do not know the Record ID of the form/record on the screen.
    The second embedded table for Planned Activities, those records are children of the displayed record.

    I'm very interested in learning more about your solution as well!

    ------------------------------
    Jon Froderberg
    PRIME Developer
    Harder Mechanical Contractors
    https://www.harder.com
    Portland, OR
    801.946.0576
    ------------------------------



  • 6.  RE: Create Child Record With Button From Embedded Table Report Link

    Posted 04-27-2022 17:49
    @Jon Froderberg Contact me by email and I can give you a quick demo right now.​

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 7.  RE: Create Child Record With Button From Embedded Table Report Link

    Posted 05-10-2022 17:16
    Mark met with our team for an hour and a half Monday 5/9 and set up what he calls a 'User Focus' table in our Project Management application and it works beautifully!  Thanks Mark!

    ------------------------------
    Jon Froderberg
    PRIME Developer
    Harder Mechanical Contractors
    https://www.harder.com
    Portland, OR
    801.946.0576
    ------------------------------