Use a specific form for viewing and editing records based on a value of the record | Discussions

Expand all | Collapse all

Use a specific form for viewing and editing records based on a value of the record

_anom Diebolt)06-18-2018 16:42

  • 1.  Use a specific form for viewing and editing records based on a value of the record

    Posted 07-03-2014 19:04

    Is it possible to "force" the use of a specific form for viewing and editing records based on a value of the record?

    For instance, I have a projects table and each of the projects displays different fields on the form based on the 'type' of project. Rather than having all projects display fields that are not relevant, I want to create a very customized form for each of the projects, and I want that form to be 'called' whenever the user clicks on the eye/pencil icons to view/edit the record.

    I know I could do this by creating project-specific roles and assigning the needed forms to each role, but I do not want to create 30+ roles just tor this functionality.

    I also know that I could create a custom button that opens a specific form for viewing the record, but the problem is that when the user switches from view mode to edit mode, the default form 'kicks in' rather than the project-specific form. The custom button would work if I could keep the custom form when switching between views.

    Anyone know how to accomplish this?

    Thanks in advance.

    Juan



  • 2.  RE: Use a specific form for viewing and editing records based on a value of the record

    Top
    Contributor
    Posted 07-03-2014 19:34
    Yes this is possible. I assume you have an association between the value of the [type] field and the form id such s this:

    type=alpha => dfid=10
    type=beta => dfid=11
    type=gamma => dfid=11

    Basically all you have to do is use the image onload technique on the report and modify the href attribute on the edit and display icons according to the value of [type] for that record. So if [type]=alpha for the record the normal html markup for the icons would be modified to append the extra parameter &dfid=10 to the href attribute on the edit and view hyperlinks.
    See:
    http://pastie.org/9351382

    I will put this on my ever expanding list of demos to create.


  • 3.  RE: Use a specific form for viewing and editing records based on a value of the record

    Bronze
    Contributor
    Posted 06-14-2018 16:43
    I need to implement this. Thanks for your help.


  • 4.  RE: Use a specific form for viewing and editing records based on a value of the record

    Posted 06-05-2018 15:08
    Dan, I created the Module.js page, and followed your onload technique. I am a rookie...so here is what i am trying to do but cant...My users can click on 5 different buttons on the home page which takes them to a specific form. Each is a different type of communication request form. Once they click save, and reopen the record it goes back to the generic form instead of the specific form for that communication. How do I get the record to go to the specific form every time? Sorry if this sounds like a repeat question.  Thanks...Gregg 


  • 5.  RE: Use a specific form for viewing and editing records based on a value of the record

    Posted 06-05-2018 15:10
    Gregg
    Any chance you can go back to form rules and just 1 form. Then there is no problem of which form to use as there is only 1 form.


  • 6.  RE: Use a specific form for viewing and editing records based on a value of the record

    Posted 06-05-2018 15:12
    i agree...but my rules begin to get in the way...Ill work on one form...it seems much cleaner to have individual forms.


  • 7.  RE: Use a specific form for viewing and editing records based on a value of the record

    Posted 06-05-2018 15:47
    IMHO it�s worth the hassle to use form rules.

    Keep in mind that you do not want to think about the fields to show and hide and require interms of the Roles first.

    Rather, think about each field or more ideally section as to under which circumstances of Roles should see that section. The Rules will be clearer and not conflict if you just work on one section at a time and make a rule for that.


  • 8.  RE: Use a specific form for viewing and editing records based on a value of the record

    Posted 02-11-2019 18:22
    Not enough roles. I don't need a participant to be an admin.  


  • 9.  RE: Use a specific form for viewing and editing records based on a value of the record

    Posted 06-05-2018 17:01
    Thanks for the assistance. I was able to clean it up and now working great. Thanks for the quick responses too! Have a good week.


  • 10.  RE: Use a specific form for viewing and editing records based on a value of the record

    Bronze
    Contributor
    Posted 06-14-2018 16:48
    Would you share your Module.js page and your formula that calls it so I can implement this on my app.

    Thanks


  • 11.  RE: Use a specific form for viewing and editing records based on a value of the record

    Bronze
    Contributor
    Posted 06-14-2018 16:49
    Would you share your Module.js page and your formula that calls it so I can implement this on my app.

    Thanks


  • 12.  RE: Use a specific form for viewing and editing records based on a value of the record

    Bronze
    Contributor
    Posted 06-18-2018 16:19
    Dan, Did you ever create a pastie for this?

    Thanks


  • 13.  RE: Use a specific form for viewing and editing records based on a value of the record

    Top
    Contributor
    Posted 06-18-2018 16:42
    Nope the thread is four years old


  • 14.  RE: Use a specific form for viewing and editing records based on a value of the record

    Bronze
    Contributor
    Posted 06-18-2018 19:41
    I understand Dan however my question is if you can explain a little more how this would work.

    Thanks