Feature Appleworks had – how with Tap Forms

Tap Forms – Organizer Database App for Mac, iPhone, and iPad Forums Using Tap Forms Feature Appleworks had – how with Tap Forms

Viewing 7 reply threads
  • Author
    Posts
  • October 11, 2019 at 3:49 AM #37051

    patrick powell
    Participant

    Several years ago, I used the database function which came with Appleworks to try to work out changes in the number of Commons seats given a certain percentage swing. I realise it is not that straightforward but I wanted a ballpark figure.

    I spent a lot of time inputting the results from the most recent general election – constituency, top three candidates and the votes they got (and as percentage of turnout) etc, then applied a broad calculation, e.g. ‘if swing from X to Y is . . . what would be the difference in seats on or lost’. I then filtered the new results and compared them with the old results.

    I have been looking at Tap Forms (which I bought earlier this year for a different project) and can’t seem to work out how to do the same thing. Is it possible?

    Also with Appleworks I was able to layout the different fields in a visual arrangement and colour them according to the political party – blue, red and orange. Is that possible with Tap Forms?

    October 11, 2019 at 10:06 PM #37064

    Brendan
    Keymaster

    Hi Patrick,

    It sounds to me like what you would need is a Script field to do your if/then function. How’s your JavaScript? :)

    You can create custom layouts in Tap Forms for Mac and colour your fields and values as you like.

    The online user manual will have all that you need to know to get started with scripting in Tap Forms and for customizing layouts. You can access the manual from the Help menu.

    Or click here for Scripting: https://www.tapforms.com/help-mac/5.3/en/topic/scripts

    and here for layouts: https://www.tapforms.com/help-mac/5.3/en/topic/layouts

    Thanks!

    Brendan

    October 11, 2019 at 11:21 PM #37067

    Sam Moffatt
    Participant

    I’m curious, do you have screenshots of what it used to look like in Appleworks?

    How are you modelling your data in Tap Forms? Is it the same way you modelled it in Appleworks or different?

    October 12, 2019 at 1:43 AM #37070

    patrick powell
    Participant

    This was so long ago I can’t remember. I was still using OS9 it was that long ago. I don’t know why Apple ditched the database function when the introduced their iWorks suite, but they did. I bought Tap Forms at the beginning of the year to create a database (and did so, a very, very simple one) and I really haven’t spent a great deal of time getting to know it and its features. So, no, I have no screenshots.

    I mentioned that I wanted to get a rough idea of how a general election would turn out given a certain likely swing and that is what I want to do again. Brendan has mentioned javascript (with which I am not at all familiar but I will check it out) so I shall see how I get on.

    I would be surprised if Tap Forms didn’t have a ‘visual’ feature because when I was looking up an alternative to Appleworks database (and not wanting to spend a million on Filemaker) Tap Forms seemed to be getting most of the thumbs-up.

    October 12, 2019 at 5:43 PM #37087

    Brendan
    Keymaster

    Hi Patrick,

    I’m not sure what you mean by “a visual feature”? There’s lots of ways to visualize your data in Tap Forms.

    Thanks,

    Brendan

    October 13, 2019 at 4:51 AM #37111

    patrick powell
    Participant

    Thanks for that, Brendan,

    actually, ‘visual feature’ is a bit misleading and not important. I simply meant ‘what it looks like when the fields for separate boxes in a customise layout, rather than the records are listed.

    But I wonder whether you could point me in the right direction on another matter?
    I have an Excel spreadsheet listing the results of the 2017 UK general election. I have attached a small screenshot to show what I mean. I’ve found it best to import a .csv

    My problem is that each party – the winner, the runner up etc – gets a separate record, i.e. 1 record: constituency winner, 2 record: same constituency runner-up etc, so that if, for example six candidates stood in a certain constituency, that constituency will get six records. What I want is for each constituency to get ONE record – the constituency – in which I can then have the different parties/candidates in separate fields, i.e. Winner, 2nd, 3rd, 4th etc. Is there anyway I can do that, either when I import the .csv file or (and I realise this is an Excel question not a Tap Form question – set up the .csv so that when it is imported that is what I can get?

    Attachments:
    You must be logged in to view attached files.
    October 13, 2019 at 10:12 AM #37119

    Daniel Leu
    Participant

    I had a similar problem the other day. These are the steps I would use:

    1) Import your data into a form called “election results”.

    2) Create a second form called “constituencies”. Then create a form script that makes an array that contains each constituency only once. Using a javascript set object makes this very easy. Then have this script create new records in constituencies, one per constituency. Once done, you can delete this form as it is no longer needed.

    3) Link the two forms together using the ‘join’ link type on the constituency field. Now the two forms are linked. Enable Show Inverse Relationship.

    4) In the “constituencies” form, you now can do your analysis where you count the number of votes each party got etc. Thanks to the linked forms, you can easily loop over all matching records in the child form and add the votes per party. For this analysis you would have a bunch of record scripts that do the work for you.

    Hope this gives you an idea how this could be done. Happy coding!

    October 13, 2019 at 12:20 PM #37120

    patrick powell
    Participant

    Well, I get the theory of what you suggest (I think) but I have never tried my hand at javascript coding ever e.g. I haven’t a clue what an ‘array’ is. But I shall look into it tomorrow and follow the link Brendan gave for help with javascript coding. Thanks for the advice. P

    October 13, 2019 at 10:54 PM #37122

    Brendan
    Keymaster

    Hi Patrick,

    If I were to need to do this, I would probably first generate a unique list of the constituencies in Excel:

    https://support.office.com/en-us/article/filter-for-unique-values-or-remove-duplicate-values-ccf664b0-81d6-449b-bbe1-8daaec1e83c2

    The above page will tell you how to filter the list of constituencies to get a unique list with no duplicates.

    Export the constituencies column to a CSV file.

    Import that CSV file into Tap Forms. Don’t forget to make sure the first row is a proper field name which Tap Forms can use to generate a field.

    Now that you have your unique Constituencies form with each record having the name of the constituency, import the other file as is into a separate form, including the duplicated constituency names. You can call it Election Results as Daniel suggested. Or whatever you like.

    Now, as Daniel suggested, add a Link to Form field from Constituency to Election Results. Set the Link Type to Join and pick the Constituency name field as the “Values from this form’s field” and the Constituency Name field from the Election Results form as the “match values from this field” setting.

    So now when you click on a specific Constituency record, you will see a list of the election results just for that one constituency. Tap Forms will use the constituency name field in both forms as the joining field for the relationship.

    I hope that helps you to get what you’re looking for.

    The nice thing about this way of doing it is you don’t have to create separate fields for each party. If new parties come and go, then you just have more or fewer child records in the Election Results child form.

    Hope that helps!

    Brendan

    P.S. An array is just a collection of values. They can be single or multiple dimensions. A single dimensional array just contains a list of values, one value per line (although the values can be composed of anything, even multiple words), but still one column. Like a Pick List in Tap Forms.

    A two-dimensional array is like a table of values, exactly like your screenshot showed with rows and columns. Each row is an item in the array, but each row can contain multiple columns of values.

    October 13, 2019 at 11:08 PM #37123

    Daniel Leu
    Participant

    Yeah, it is much easier to make the list of constituencies in Excel, at least if you know Excel or know how to use google… lol

    When I had to do this, it was part of an exercise to get to know TapForms better.

Viewing 7 reply threads

You must be logged in to reply to this topic.