FV - Switch Views? - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

FV - Switch Views?

Last post 05-04-2021 08:03 AM by Hilary Stoupa. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 04-28-2021 07:19 AM

    FV - Switch Views?

    I have a Web form (InfoPath) that switches views in a special case based on whether or not a field has a value, but in converting it to FV I don't see "Switch View" as an option when I moved the On Load rules to finishedLoading, so I set about to trigger the switch view based on a field's value after finishedLoading is done, but I don't see Switch View anywhere. All I see are "Set a field's value," "Query for data," "Submit data," and "Send data to a Web Part."
  • 04-28-2021 09:27 AM In reply to

    On finishedLoading, use the SetDefaultView qRules command. Set the command field to: SetDefaultView /view=YourViewNameHere
    Hilary Stoupa

  • 04-29-2021 06:23 AM In reply to

    See attached screen shot. I obviously do not know how to use Q-rules and the Command field. With InfoPath, whenever I needed a function, I picked from a list. Here, when I copied/pasted "SetDefaultView /view=No E-mail" the space before "/" is automatically removed, but putting it back in did not help. What I want is that if the CurrentViewer-WorkEmail is blank and the NumID is blank, show the view "No E-mail" which provides instructions to the user - otherwise, the default view should display. Unrelated topic, but I also discovered that if I put a formatting rule that instructs a field to be "disabled" it does not work in FV (it does in InfoPath). I can always go into the field properties to select the check box for "Read-only" but I usually set up a back door to my forms so that I can go in and edit fields if I need to, as an administrator. However, the field should be Read-Only to everyone else. Marking the properties to Read-Only locks me out too. Disabling a field under certain circumstances used to give me what I needed.
  • 04-29-2021 07:59 AM In reply to

    Since we are setting the command field to a string value, no need to click the "fx" button and put this in the formula editor. Just paste in the string. Please note there is a space between SetDefaultValue and /view. InfoPath may have removed that when you pasted it into the formula editor window because it is expecting valid XPath. Formatting rules should work in FormsViewer. If you have a form where formatting rules are not working, please send it to support at qdabra dot com and let us know so we can check for a possible bug.
    Hilary Stoupa

  • 04-29-2021 08:01 AM In reply to

     Also - here is a YouTube video to getting started with qRules. The process is a little different with a FormsViewer form  - you can inject the form in FormsViewer, for example. But the basic concepts should still hold true.

    Hilary Stoupa

  • 05-04-2021 08:03 AM In reply to

    Just to update this thread with the results from an email conversation - there was a FormsViewer bug with formatting rules not disabling text boxes. It was fixed in Dec. 2020, so on-prem users who run into this should upgrade.
    Hilary Stoupa

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.