Fljótleg og einföld: Gera að InfoPath Form Lesa Aðeins (InfoPath Eyðublöð Þjónusta í mosa)

Það er sameiginlegt fyrirtæki atburðarás eins og þetta:

  • Notandi fyllir út InfoPath mynd.
  • Leggur formi.
  • Long-hlaupandi workflow ferli ánægja burt.
  • Þó að workflow er í gangi, við viljum ekki einhver til að breyta efni á formi.

This office.microsoft.com example describes how to create a separate "view" and mark the whole view as read-only. This is a workable approach but has the drawback that you’ve effectively created two entire versions of the same form and must now keep them in sync manually. If you add a field to the editable view, you must then add it to the non-editable view as well. Með tímanum, with different developers, there can be some divergence.

This alternative might work better in some cases:

  • Add a new field to the form called "IsEditable".
  • Set its default value to true.
  • Promote it when publishing to MOSS.
  • Í workflow, set the value of IsEditble to false.
  • Go back to the form.
  • Add a rule that "upon open of the form", disable your save button when IsEditable is false.

The drawback to this approach is that all the fields will still be editable on the screen. The user can get a false impression that they can actually change content. You can mitigate that by putting in some text that the form is disabled, possibly in big red letters across the top of the page.

In one project, I created a "workflow status" skoða. As the workflow progressed, it would update specific status fields that had been promoted from the form. When the user opened the form, the "open form" rule automatically switched to that view and the user had a nice little summary status.

</enda>

Gerast áskrifandi að bloggið mitt.

5 hugsanir á "Fljótleg og einföld: Gera að InfoPath Form Lesa Aðeins (InfoPath Eyðublöð Þjónusta í mosa)

  1. Paul Galvin

    Og, you wrote "Pardon my ignorance, but when you refer to the "Save" button, are you referring to the button that appears on the top of the infopath form when displayed in Sharepoint, which I think is enabled in the "Open and Save Form options" when designing the form? Ef svo, how can it be disabled by a rule – I’ve looked but must be missing something that is obvious. takk, Og"

    Í minn reynsla, most "real" production forms end up having a specific button used to save the form. The default save function in InfoPath will prompt you for a file name and usually we want to generate that file name automatically. Svo, I mean to disable your custom submit button. HTH,

    –Paul Galvin

    Svara
  2. Ekkert nafn

    Pardon my ignorance, but when you refer to the "Save" button, are you referring to the button that appears on the top of the infopath form when displayed in Sharepoint, which I think is enabled in the "Open and Save Form options" when designing the form? Ef svo, how can it be disabled by a rule – I’ve looked but must be missing something that is obvious. takk, Og

    Svara
  3. Sanjeev Rajput
    Paul,
    Can you use conditional formatting in an InfoPath form? I have a dataview form in sharepoint which is read-only using the conditional formatting to make it ‘appear’ greyed out to the user – depending on their name. I just don’t know if you can do that in the Infopath form?
    Kveðjur
    ThiNg
    Svara
  4. Paul Galvin
    eugalatha,
    Good point and the approach I describe above would have to be modified. If I had to conditionally allow certain fields to be updated, then we’re probably back to multiple views, or a lot of conditional enable/disable logic. The fundamental idea would be the same — use flags to manage which bits of the form are enabled and have workflow set those flags as needed.
    Svara
  5. erugalatha wrote:

    What happens in the scenario where you want to collect signatures for approval/denial as your workflow runs? If you disable the save – no further editing allowed – þannig að ef ég er að horfa á þetta rétt þú verður að yfirgefa formi editable að safna undirskriftum = engin lausn.

    Svara

Leyfi svar við Sanjeev Rajput Hætta við svar

Netfangið þitt verður ekki birt. Nauðsynlegir reitir eru merktir *