Groups¶
Works for both regions
Groups are fully functional for both Iceland and Denmark — no Fjárvís-related restriction was found in the
screen or in GroupsService.
1 · Open groups¶
On the Dashboard, under "Groups", a list opens that updates automatically (a live PowerSync query). Each card shows a colored bar, name, animal count ("N animals"), an optional description (up to two lines), and when the group was created ("today" / "yesterday" / "N days ago" / a date). A search box filters groups by name or description. If the list is empty you'll see "No groups found" — "Create your first group to organize your animals."
2 · Create a group¶
Tap + to open "Create Group".
| Field | Required? |
|---|---|
| Group name (at least 2 characters) | Yes |
| Description (optional) | No |
| Group color | Yes — chosen from a fixed palette |
Only ten fixed colors are available
Color choice is not free-form — you pick from ten named colors (red, blue, green, purple, orange, teal, pink, indigo, brown, grey). There's no custom color code option.
Tap "Save Changes" (or the equivalent save button).
No duplicate-name check
The code neither checks nor prevents two groups from sharing the same name — not in the app, and not in the database.
3 · Add animals to a group — three ways¶
The same action is available from three different places in the app:
a) Inside the group itself — tap a group card to open it. A search field (not a checklist) searches all animals in the settlement by ear tag, name, number, or valnr; animals already in the group don't appear in suggestions. Tap a result to add it directly.
Scan to add or remove
An EID reader works on this screen (see Connect an EID reader to the app). If no animal matches the scanned tag, you'll see "No animal found with tag: {tag}" — the same message as in animal search. If the scanned animal is already in the group, you're asked instead: "Animal Already in Group" — "{animal} is already in this group. Would you like to remove it from the group?"* — with an option to permanently turn that warning off.
b) From an animal's record — the "Groups" card lists every group the animal belongs to, plus a button to add it to more. That button opens a list of every group in the settlement (or "No groups available. Create a group first" if none exist).
c) From an animal's weight or judgement history — the same "Add to group" button and the same picker as in (b).
4 · Remove an animal from a group¶
From any of the above, a confirmation dialog appears: "Are you sure you want to remove '{animal}' from the group '{group}'?"
Editing or deleting a group¶
On the groups list, a three-dot menu on each card offers two options: edit (opens the same form used to create it, pre-filled) or delete — with confirmation: "Are you sure you want to delete '{name}'?"
Where group membership shows up elsewhere¶
Colored dots appear next to each row in animal search — display only, you can't tap them there to change membership. Groups otherwise have no effect on any dashboard statistics or reports.
Based on lamb41/lib/screens/groups/groups_list_screen.dart, create_group_screen.dart,
group_animals_screen.dart, and lamb41/lib/services/groups_service.dart. See also
Connect an EID reader to the app and Finding animals.