Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I prevent a user from deleting any rows in Infopath? I just want them to be able to add new rows and make updates.

share|improve this question
up vote 2 down vote accepted

I dont think you can... Usually the permissions to change and/or add ("edit") means you can also delete (since you could always edit it to be blank/empty anyway).

Here are your permission choices according to the MS Office on-line help:

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.

From's forums:

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. Make fields read-only

    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

  3. Disable inserts and deletes using a condition

    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

  4. Make previously entered rows read-only

    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

share|improve this answer
Is it not possible to do using Rules or do I have to resort to custom code? I'm surprised they haven't made it more customizable. I'm looking at which is helpful. – Gabe Oct 17 '11 at 21:27
It's been a while since I used InfoPath, but I'm pretty sure the "Rules" apply to the forms themselves (rules the form follows when "X" happens) and have nothing to do with users' access to change the forms. – Ƭᴇcʜιᴇ007 Oct 17 '11 at 21:32
I'm referring to the repeating table when they're filling out the form (not designing it). They can delete data far too easily. I'm going to remove the table and just it show one record at a time. – Gabe Oct 17 '11 at 21:39
I think the things in that link you provided are probably your best bets. – Ƭᴇcʜιᴇ007 Oct 17 '11 at 21:41
I added the info from that link to my answer, for future users' sake. Sorry I can't come up with anything easier for ya. :( – Ƭᴇcʜιᴇ007 Oct 17 '11 at 21:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .