Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Script Talk › Help with a script 2
- This topic has 3 replies, 2 voices, and was last updated 2 years, 8 months ago by Daniel Leu.
-
AuthorPosts
-
February 27, 2022 at 2:14 PM #46894
Stig WidellParticipantThe Swedish farmer has received successful help with earlier scripts.
But there is a need for one further script and the knowledge in JavaScript is still nonexistent.
So help with a form script is most welcome!!
A document template of “Djur” is enclosed.This is the background:
In the form “Kalvningar” are calves from the season listed. They will be split into three groups:
– female calves kept for breeding
– female calves for sale (the rest)
– male calves for saleThe script should perform the following:
Go through all the calf records and check:
1. if a female calf and the field “Utgångsorsak” IS NOT empty (breeding info already entered): enter a transaction date in the field “Utgångsdatum” for each record and make a copy of these records with information in fields “Utgångsdatum” and “Utångsorsak” deleted ie. empty and transfer these copies over to the form “Rekryteringsdjur”.
2. if a female calf and the field “Utgångsorsak” IS empty:
– enter a sales date (to be typed in) in field “Utgångsdatum” and the information “Försäljning” in field “Utgångsorsak”.
3. if a male calf and the field “Utgångsorsak” IS empty:
– enter another sales date (date of sale for males and females not the same) in field “Utgångsdatum” and the information “Försäljning” in field “Utgångsorsak”.If both the fields Utgångsdatum” and “Utgångsorsak” IS NOT empty: go to next record.
Finally should the group information in the field “Grupp” in the form “Rekryteringsdjur” for all records in that form be deleted so that the field is empty.
Now the data base is prepared for a new calving season.
Attachments:
You must be logged in to view attached files.February 27, 2022 at 2:35 PM #46896
Daniel LeuParticipantFor #2 and #3, maybe just creating a saved search with the given criteria is sufficient. This way you get all the records that match and then you just enter the date and other information one after the other. You can use multi-column list view which might make it a bit faster to enter all data.
March 2, 2022 at 7:20 AM #46908
Stig WidellParticipantThanks for info. It makes me understand now that there is no need for a script.
I can manage everything without.March 2, 2022 at 9:31 AM #46910
Daniel LeuParticipantPerfect!
-
AuthorPosts
You must be logged in to reply to this topic.