How are the IDX numbers incremented?

Dear frappers,

I understand that IDX numbers are used to determine the order in which items are created in the child table. However, I don’t see any specific order/sequence of IDX column values in regular tables.
What are the various purposes of the IDX column?

Any help would be greatly appreciated.

As per my understanding, idx column in child tables is used to keep items in a specific order. It helps show items in the same order as they were added, which is important for displaying them correctly on forms and reports. The idx value makes it easy to sort, reorder, and manage items within the table. It ensures that items stay in the right sequence and can be uniquely identified for updates or deletions.

1 Like

Thank you for your reply. I completely agree with that perspective. However, what is the purpose of the idx column in regular tables (non-child tables)?

As an example, I’ve created a student document and inserted three records into the student table. I’ve noticed that all three records display 0 in the idx column. I’m simply interested in understanding if the idx column serves any other function besides in child tables.

stud2

Are you talking about the parent doctype or the child doctype? Your explanation seems to mix up the concepts. You mentioned the parent doctype of the image but are discussing the child level. Could you clarify what you mean?

Thank you for your response. I’m referring to tables that aren’t involved in any kind of parent-child relationship. These tables neither act as children to any parent nor as parents to any children. Does the idx column in these regular tables serve any specific purpose?

After creating a student document and adding three records, I noticed that all three records have an idx value of 0. Is there any significance or purpose to the idx column in this scenario?

I think. there is no such concept of idx for parent doctype.

1 Like