Evitar a exclusão de uma linha na tabela de repetição do Infopath 2010

1

Como posso evitar que um usuário exclua as linhas no Infopath? Eu só quero que eles sejam capazes de adicionar novas linhas e fazer atualizações.

    
por Gabe 17.10.2011 / 22:09

1 resposta

2

Eu não acho que você pode ... Normalmente, as permissões para alterar e / ou adicionar ("editar") significa que você também pode excluir (desde que você sempre pode editá-lo para ficar em branco / vazio de qualquer maneira).

Estas são suas opções de permissão de acordo com as Ajuda on-line do MS Office :

Users or groups can be given a set of permissions according to the access levels assigned to them by authors using the Permission dialog box, as outlined in the following list:

  • Read: Users with Read access can read a form, but they don't have permission to edit, print, or copy the form.
  • Change: Users with Change access can read, edit, and save changes to a form, but they don't have permission to print the form.
  • Full Control: Users with Full Control access have full authoring permissions and can do anything with the form that the form author can do, such as set expiration dates for content, prevent printing, and give permissions to users. Form authors always have Full Control access.

De fóruns do infopathdev.com :

If you want to prevent them from deleting data in items within a repeating table there are several techniques:

  1. Disable inserts and deletes the table

    TODO: double click repeating table blue button in the designer and under default settings uncheck allow inserts and deletes Pros: easy to do Cons: heavy-handed

  2.   
  3. Tornar os campos somente leitura

         

    TODO: double click the cells in each column and check read-only on Display tab Pros: easy to do Cons: can't add data to cells, but rows can still be inserted or deleted

  4.   
  5. Desativar inserções e exclusões usando uma condição

         

    TODO: double click the repeating table blue button in the designer and add a conditional formatting rule to disable insert/delete Pros: easy to do, you can use the expression condition of "1=1" to make it always true Cons: only good for read only items, but you can add a button to insert new items if you use qRules

  6.   
  7. Tornar as linhas inseridas anteriormente como somente leitura

         

    TODO: add a conditional formatting rule that makes the value read-only based on some condition (for example, already entered data) Pros: supports entering new data Cons: last row is editable until new row is added, semi-complex xpath required to compare current index of row with count of table to allow entering new data, but easy

  8.   
    
por 17.10.2011 / 22:19