Content Types and DFFS – newform.aspx opening different starting tabs/rules

Forums Dynamic Forms for SharePoint Content Types and DFFS – newform.aspx opening different starting tabs/rules

Viewing 7 reply threads
  • Author
    Posts
    • #29569
      Paul Lynch
      Participant

      Hi Alex,

      I understand you do not recommend using content types with DFFS, and the functionality can be mimicked/copied using the tabs/rules etc.

      QUESTION

      Out the box list content types, lets you create a links from a page that opens that particular out the box SP form showing different field, based which link went to which content type.

      How do we mimic this using DFFS?

      I think you can open a specific tab adding some text to end of the URL (at least for edit form). But is there any way we could let users, using different links to see different fields on their newform.aspx via purely DFFS?

      Kind Regards,
      Paul

    • #29576
      Alexander Bautz
      Keymaster

      Create your link something like this:

      .../Lists/YourList/NewForm.aspx?ShowForm=FirstType

      Then create a rule in your DFFS NewForm triggering on “URL Query string key equals” and insert this in the This value field:

      ShowForm=FirstType

      Now you have a rule triggering on this URL key and can show fields or tabs etc. based on this key. Add multiple different links – for example ShowForm=SecondType and pick up the URL key with different rules and you should be good to go.

      Let me know how this works out.

      Alexander

    • #29594
      Paul Lynch
      Participant

      Thanks Alex,

      This seemed to work brilliantly at first.

      But when I tried to add two URL Query Strings via two rules, one rule appears to stop being applied. (the first rule)

      I debugged both rules, and it seems to successfully apply the Query String logic and turn green (depending on the URL) and the other a red false as expected. But for first rule, it does not do anything, as if there is no query string at all in the URL.

      What is really strange is that if I change the order of the rules around (the second one is then applied not the first one). These are the only two rules on the form.

      I thought something had gone corrupt, so I created a new list and installed DFFS again, and had same outcome.

      Configuration
      TAB 0 (Index 0) and TAB 1 (Index 1)

      RULE 1
      TAB 0 – ShowForm=FirstType (this is in the rules for Query String)
      Set to hide tab 0 (hides a Unique ID, and shows a Unique ID in TAB 1)
      RULE 2
      Set to hide tab 0 (hides a Unique ID, and shows a Unique ID in TAB 1)
      TAB 1 – ShowForm=SecondType (this is in the rules for Query String

      The result of the above configuration:
      URL – …/Lists/YourList/NewForm.aspx?ShowForm=FirstType
      just shows up the form as if no rules were applied.
      URL – …/Lists/YourList/NewForm.aspx?ShowForm=SecondType
      Follows the rule.

      Both debugs show they action rules correctly.

      Switching RULE 1 and RULE 2 around, causes one to work the other to not work.

      • This reply was modified 2 months, 1 week ago by Paul Lynch.
      • This reply was modified 2 months, 1 week ago by Paul Lynch.
      • This reply was modified 2 months, 1 week ago by Paul Lynch.
    • #29601
      Alexander Bautz
      Keymaster

      I guess this is caused by the built in automatic reversing of rules evaluating to false – try clicking the “No reversing of this rule” checkbox for each of the configured ruels.

      You find more info about reversing of rules in the top of the Rules tab.

      Alexander

    • #29663
      Paul Lynch
      Participant

      Thanks Alex this fixed it.

      Not sure why I did not even try this.

    • #29666
      Alexander Bautz
      Keymaster

      Thanks for the feedback – I’m glad it fixed the problem.

      Alexander

    • #30346
      Paul Lynch
      Participant

      Hi Alex,

      I am trying to get the above Query string Link to work for editform.aspx but having an issue because I am not sure how to write the parameter.

      Newform is straight forward..

      ../Lists/YourList/NewForm.aspx?ShowForm=FirstType

      But Editform has things like
      ?ID=
      &Source= (handy redirect)

      Looking to create a link in the send email function in a newform.aspx. The link in the email will take the user to the editform.aspx with a specific URL that will show them a specific form (based on a Query string rule)

      e.g. I know I am writing this wrong..

      ../Lists/YourList/Editform.aspx?ID={ID}&ShowForm=ThirdType&Source=etc...

      Also in newform, the form has not populated the ID, so not sure I can even do this, unless there is a way to use the _DFFSID?

      • This reply was modified 1 month ago by Paul Lynch.
      • This reply was modified 1 month ago by Paul Lynch.
    • #30350
      Alexander Bautz
      Keymaster

      When creating a link from NewForm you don’t have the ID, but I have functionality in DFFS that lets you specify it like this:

      .../Lists/YourList/Editform.aspx?DFFSID={_DFFSID}&ShowForm=ThirdType&Source=etc...

      When you now follow the link and enter EditForm, DFFS picks up the DFFSID key from the URL and finds the correct ID from a query and redirects you to the correct item.

      Alexander

Viewing 7 reply threads
  • You must be logged in to reply to this topic.