Search Results for 'script'
-
Search Results
-
I wish to use the
record.addFileFromUrlToFieldfunction to add an attachment to a File Attachment type field.The files are all named in a consistent way: year + job number + “invoice – invoice number” but then the invoice number various.
An example:
If the file is called: “2022_046 – Smith Consular Service invoice – invoice number UK144720.pdf”
I can form the first part of the filename from a Tap Forms field (“2022_046”) plus the text upto the invoice number. It is the end part of the file name which I cannot form (“UK144720” in the above example) as it changes from file to file.
The script I have come up with at the moment is:
function Add_Attachment() { var file_attachment_id = 'fld-1f7f08ca22de4884b5a7aa6b52a74251'; var protocol_number_full_file_naming_id = 'fld-cdbcef5028c54e8591313e2bc5295d1a'; var protocol_number = record.getFieldValue('fld-cdbcef5028c54e8591313e2bc5295d1a'); var url = "file:///Users/victor/Desktop/" + protocol_number + " - Smith Consular Service invoice - invoice number [ ].pdf" console.log(url); record.addFileFromUrlToField(url, file_attachment_id); document.saveAllChanges(); } Add_Attachment();It is the part in “[ ]” in
var url = "file:///Users/victor/Desktop/" + protocol_number + " - Smith Consular Service invoice - invoice number [ ].pdf"with which I would like to known if it is possible to use a wildcard/regular expression.
Any help would be gratefully received.
Hi.
If I’m not asking too much, could someone help me with the following database?
Here’s the scenario:
I am team manager for two girls soccer teams. Both are the same age group of girls, but one is the A team, the second is the B team. In our club, they are both 08(year they were born) teams and their team IDs are TK and NM.
So the A team is 08 NM
B team is 08 TKThere are approx. 18 girls on each team and for the most part, the 08 NM roster always plays together, and the 08 TK roster plays together. When we play at tournaments, this can change. Some of the 08 NM girls may play for the 08 TK team, and vice versa. Also, we may have guest players.
As a club, each player has club fees, uniform costs, and registration costs that should be the same for each player (but can be different).
Also, every tournament has its costs that players are responsible for. I add all the costs, such as the tournament registration cost for the team and coaches travel expenses together and divide that figure based on the amount of girls going to the tournament. There will always be one registration cost per team for each tournament so that gets divided between the amount of girls in that team. But sometimes if both teams are going to the same tournament, then the coaches travel expenses will be divided by girls from both teams. So, for example, if the 08 NM and the 08 TK team are both going out of town to the same tournament, then we would all split the coaches travel fees. ($400 divided by 18 vs. $400 divided by 36)
I want to be able to record these things:
First, the players info. Name, team they are on, Jersey #, people related to them (I’ll explain why in a minute).Second, I want to keep track of Costs and Fees. I need to be able to list what fees are charged for each season. Examples: How much registration was, uniform was, etc.
I want to know what tournaments we attended and what the cost was to be in the tournament. I want to be able to show who played at each tournament (that will give me the number to divide the cost by)Third, and most important, I want to track what each player owes and what each player was a part of. Somewhat an attendance record for each player.
My main goal is to be able to say, Player 1 owes me $X amount of money. This is because Player 1 was in this tournament, which was on this day, and costs this much. I would like to be able to track each time Player 1 makes a payment, how much, for what, and her balance. A register of each players transactions so when a parent asks me “what do I owe” I can answer “you owe this much because of these reasons and you paid me on these dates so far”.
Right now, my method is not great at all of keeping track and I am getting worried I am not going to be able to get on top of this problem if I don’t make a change now. That’s why I am begging for help.
I accept payments from parents mainly through my bank and the parents use zelle. So, this is great because I can go back and look through transaction to see who paid when. But, I do this manually each time a parent asks and it’s so much work. I have to search for their parents name on the bank site( this is why I wanted people to record who is related to each player) so, maybe if was automated this task, I could pick Player 1 to find their payments and automatically it knows to include Player 1’s moms name and dads name into the search.
Is there a way to use a script to automatically retrieve the statements from my bank (my bank allows downloads of statements in a .csv output that I can upload to tapforms.) and have 5he statements refresh and update each players payments log or record?
I’m sure this was a lot to read and maybe too much to ask help with. But, if anybody can help and make my life easier while managing two teams, I know the staff , owner, and dedicated people who monitor these forums are the smartest people ever and can help me.
There’s probably things I missed that may cause confusion, but please ask. I can better describe anything.
Thanks for your time.
Can’t wait to see if someone will help.Yvette
Topic: Creating a dictionary
Hello everybody,
I like to create a dictionary database for classical languages based on some scanned dictionaries (19th and 20th century) that are available in the form of PDF files. The PDF files are not searchable and due to the mixing of several alphabets and diacritical characters present in these files ocr is not reliable (creating searchable PDF files would be very time consuming).The database should work with user input based on the roots of the language.
Example for one PDF file. Let’s call the dictionary
DICand letABCbe a root.All entries in
DICpertaining to the RootABCare present on a certain page ofDIC.I have a list of all possible roots and the page number pertaining to each root, for example
ABC: 23
ACE: 51`
BBD: 134`
…I like to create a Tap Forms 5 document which has one of the following two options:
When the user searches for Root
ABC, either1. Tap Forms 5 tells the Preview or any other PDF-Application to open file to open the dictionary DIC and show page 23,
2. or a Form which contain all images of DIC opens record # 23.For performance reasons (the PDF files are quite large – several GB) I’am inclined to opt for the second option.
So I have to create a form with a field that is able to accommodate photos obtained from the pages of
DIC.
My question is:
1. How can I import thousands of photos into a Tap Form 5 form
2. and how can I search for roots?The answer to the second question is probably connected to the Prompter class of the JavaScript API. But how can I import all the photos inside a Tap Forms 5 document?
Cheers
I am using the prompter function and for a popup list is it possible for one to be the default?
On running the script, the default is “Unspecified”
For example in the following code for passport_type_list variable, I would like the first entry (‘United Kingdom of Great Britain and Northern Ireland passport’) to be automatically shown rather than ‘Unspecified’.
var heshe; var heshe_list = ['his', 'her']; var director_signee; var passport_type; var passport_type_list = ['United Kingdom of Great Britain and Northern Ireland passport', 'Irish passport', 'United States of America passport']; let prompter = Prompter.new(); prompter.cancelButtonTitle = 'Cancel'; prompter.continueButtonTitle = 'Continue'; prompter.addParameter('Passport type: ', 'passport_type', 'popup', passport_type_list) prompter.addParameter('He or she: ', 'heshe', 'popup', heshe_list) prompter.addParameter('Name of the director signing: ', 'director_signee') .show('Choose whether there is a he or she\n\n\nIf a company then put in name of director signing',output);Topic: Button to trigger script ?
Is there a way to create a button (or something looking like a button) in a layout and trigger a script through it?
I’m building a simple book keeping thing with Tap Forms for my wife and she’s a complete non-techie. Starting a script from the menu would work for me, but for her a button right at the right place in a layout would be much better.
Topic: Help with simple script
I have fields just two fields that need to operate in a form….
ShareSell$Amt (numeric, id:fld-89c6961ad2ec43e8853ff13e052fc807)
NextRung$Amt (calculation, id:fld-276de1515a7c4054b9df9410cbbefd29)I just want after a find of the fields involved, to run a script to
read in the first found record field NextRung$Amt,
move to the next record and insert that read amount into field ShareSell$Amt,
then continue thru the found set of records.The first record has the beginning ShareSell$Amt that is calculated in the record as NextRung$Amt.
The function I’m looking for — is that number from the field NextRung$Amt is picked up and put into the next record’s ShareSell$Amt, and that makes that record calculate a new NextRung$Amt, which is picked up and put into the next record, then on until records in the found set run out.
This script just stops on the first record, so it needs something.
function Calc_NextRung_LADDER4() { let balance = 000000; var nextrung_id = 'fld-276de1515a7c4054b9df9410cbbefd29'; var newsharesell_id = 'fld-89c6961ad2ec43e8853ff13e052fc807'; //var transaction_date_id = 'fld-2567fc59b0ce45f982f2fe2d20eb0d79'; //need a saved find 'Calc_Balances LADDER4' //Sam Moffatt, Tap Forms Forum, 10/21/2019 #37289 for(record of form.getSearchNamed('Calc_Balances LADDER4').getRecords()) { balance += record.getFieldValue(nextrung_id); record.setFieldValue(newsharesell_id, balance); } document.saveAllChanges(); } Calc_NextRung_LADDER4();In the screenshot, this set has 8 records or “rungs”. Theoretically the script would populate the 7 following rungs or records after the amount is first set to begin in the first record.
Thanks for those that make these things easy for those of us who infrequently dabble in scripts,
MikeTopic: Help with a script 3
Hi,
The Swedish farmer now has an excellent tool with Tap Forms 5 in organizing cows and calves. Two script are involved created by Brendan and Sam, thanks to both of them.
However there is a need for one more script.
The birth date of a calf in form “Kalvningar” is equal to the delivery date for the mother cow. In the form “Rekryteringsdjur” there is a list of all deliveries for a cow.
Now there is a need for a field in “Rekryteringsdjur” identifying the date of the cows latest delivery.
I hope someone can help me!!
Enclose the template.