Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Using Tap Forms › Extracting data from linked forms
- This topic has 11 replies, 4 voices, and was last updated 1 year, 11 months ago by Rolf Kickuth.
-
AuthorPosts
-
November 13, 2021 at 8:37 AM #45685
Bryan RobinsonParticipantI use Tapforms to keep track of sales at an art show. I have a parent dB with individual personal details (name, address, etc) and 3 child forms with one for sales from the walls, one for sales from browsers, and one for card sales. The parent is linked (one to many) to each of the forms. I wish to send a letter to each artist after the exhibition (showing personalised name and address) to indicate which items have been sold from each of the three categories, show the sale price, price after commission and the total amount the artist will receive from all sales. How do I extract the information from each of these forms into letter. Thank you
November 13, 2021 at 2:27 PM #45695
BrendanKeymasterHi Bryan,
You can create a custom layout and position your Link to Form fields on the layout and print that. The data that’s on the parent form can be injected into a letter using the mail merge feature where you can embed fields in a Text block. The fields would have their field names surrounded by square brackets.
For example:
Dear [First Name] [Last Name],
The following items have been sold.
Then you drag in the Link to Form field to appear below the form letter part. Tap Forms will display the list of records as a table. You can choose which fields to include by clicking the little X button at the top-right of the table.
When you choose the Print function, the fields will be replaced with their values from the record. You can use the PDF button on the Print screen to generate a PDF file to email to them.
Hopefully that gets you closer to what you’re wanting to achieve.
Thanks!
Brendan
November 22, 2021 at 5:12 AM #45762
Bryan RobinsonParticipantHi Brendan,
A bit difficult to get the letter to look neat, but it does the job. Thanks
BryanDecember 4, 2022 at 4:10 PM #48417
Rolf KickuthParticipantHi Brendan,
want to create a letter layout with adress from one form and text of a second form. Both are linked via a specific number (same field name in both forms) and the “join”-connection. I read your answer #45695, but it doesn`t work. Example: Want to have a first name and second name field of “addresses”-form and insert and format them on the “letters”-form. Thank you.December 4, 2022 at 7:29 PM #48421
BrendanKeymasterHi Rolf,
Because you’re using a Join link type between your Addresses and Letters form, there can be multiple addresses per letter and multiple letters per address. So the technique of getting a value from the parent form to display on the child form won’t work directly. You would have to add a Script Field that selects the specific record you want from the parent. Now maybe there’s only one in your case, but there’s still an array of them. Just containing only 1 record. You then have to get that record and then ask it for its value which you could return in the Script Field.
December 5, 2022 at 12:08 AM #48425
Rolf KickuthParticipantThank you for your quick response, Brendan. The reason why I took the “join”-function: I imported data sets from two former filemaker data bases. I see the problem, but filemaker solved it easier… Learned how to program 40 years ago (Fortran :), but I am not fit with javascript. Maybe I try…
December 5, 2022 at 12:30 AM #48426
BrendanKeymasterFORTRAN was one of the first languages I learned too (after BASIC). Both pretty similar actually. JavaScript is not so hard and the Tap Forms Script Editor will write a lot of code for you just by double-clicking on the fields or the code Snippets available there. In fact, one of the snippets is called Child Records Loop. It’ll basically write the code for you to loop through the records of a Link to Form field picking out a value from the field you had selected on the Fields list. Just select a field in the Link to Form field that appears on the Script Editor and then double-click the Child Records Loop snippet. Bang! Code written for you.
December 5, 2022 at 1:25 AM #48427
Rolf KickuthParticipantThank you, good motivation, I’ll try :) Have a little publishing office (see http://www.clb.de), need data base for subscriptions. Filemaker turned out to be only a money-making machine for Apple… Migrating from Filemaker 12 on an old Mac to a modern MacBook and TapForms; good program :)
December 5, 2022 at 1:28 AM #48428
Rolf KickuthParticipantBy the way: same system with Adobe / InDesign, Photoshop et al. Since 3 years I am using Affinity Publisher et al from Serif, coming from PageMaker, QuarkXPress, InDesign…
December 5, 2022 at 7:45 AM #48430
Rolf KickuthParticipantMaybe a last question: Did as you said.
Now I have to replace // do something (see png attached).
Simply “return name” did not work
What is the right command to display the name in the script field (or better in the text frame which shall be printed)?
Thanks and best regardsAttachments:
You must be logged in to view attached files.December 5, 2022 at 10:24 AM #48434
Daniel LeuParticipantYour code is a bit more complicated than it has to be.
return name
is correct, but when you call the loop function, there should be areturn
as well. Or just get rid of the inner loop function as shown attached. Then it should work.You can add a
console.log("Name gefunden: " + name);
and it will print out the name in the console log.Viel Spass!
Attachments:
You must be logged in to view attached files.December 5, 2022 at 12:52 PM #48437
Rolf KickuthParticipantIt works :) :) :) Thank you very much, Daniel and Brendan. Now I can rebuild some relational Filemaker databases in TapForms, print out letters, invoices etc. I think it is an important funktion. Maybe I produce a small youtube video for the german users. Best regards.
-
AuthorPosts
You must be logged in to reply to this topic.