Tap Forms app icon half
Tap Forms Forum text image
Blue gradient background

Exchange tips and ideas with the Tap Forms community

Search Results for 'script'

Viewing 15 results - 721 through 735 (of 2,989 total)
  • Author
    Search Results
  • #48430
    Rolf Kickuth
    Participant

    Maybe 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 regards

    Attachments:
    You must be logged in to view attached files.
    #48427
    Rolf Kickuth
    Participant

    Thank 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 :)

    #48426
    Brendan
    Keymaster

    FORTRAN 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.

    #48425
    Rolf Kickuth
    Participant

    Thank 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…

    #48421
    Brendan
    Keymaster

    Hi 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.

    #48418

    In reply to: global field?

    Brendan
    Keymaster

    Evenen though the Join Link Type allows you to have only one field for the join, you can add a Calculation or Script field to join two other fields together, so then you could use that as the Join field. As long as you had the same kind of field concatenating the two fields on the other side of the join.

    There’s no function to NOT print a specific field on a custom layout. But you can have multiple layouts, one for data entry that does have the field and another for printing purposes that doesn’t include said field.

    #48416
    Lane Robinson
    Participant

    I was looking for a way I can create an invoice from a saved search of ad work orders. Since there doesn’t appear to be a way to ask for record from a Saved Search of a Form, only the entire set of records in the form, I then tried a linked form Join to match two different fields, not just one, to get the set of records I need into an invoice. Which I also can’t do. In simple terms, I need to match for the client *and* for the issue of a ‘magazine’ and get only those ad work order records.

    I have a way that can work, but isn’t, um, in my face enough to make sure I don’t choose incorrectly. I’m auto entering an issue number by setting that field’s default value in the fields tab. So when I create a new invoice, the issue number is entered automatically based on that default. Together with the client ID number I can get the correct set of records from the ad work orders Form. This can work because we tend to invoice a batch invoices for the same issue at the same sitting. But we do sometimes do more than one issue at a sitting. There can be errors made if someone forgets to go into the Forms Fields and change the default entry to the correct issue number. People actually doing the invoice have discomfort with going into the Fields tab for the form, and I’d probably rather didn’t go in there either!

    To avoid errors with this, I was hoping there could be a way to have what I’ll call global field (sort of like a global variable) that is big and bright and above everything else that displays the issue number we are working in. We change that, and we could write a script that uses that field to auto enter the issue number on to the invoice. This is basically what we have with our previous <!–voldemort pro–> database.

    Another way may be to create a new layout that has this field at the top in large red type, but could we set such a field to not print?

    We do this not just with invoices, but actually even more so with reports. I mention the invoice example as that’s the place we can make errors that are more embarrassing. :) Whatever advice can be offered is welcome and appreciated.

    #48412
    richard maliszewski
    Participant

    So I have a form I do not want edited directly. Some fields are updated based on calculations performed upon other forms by the form in question’s script.

    I enabled access controls for the form, setting a password, yada, yada. Turned everything off, basically locking the form. Two questions/issues:

    1) having done this, does this mean calcuations also cannot update fields, or does it just prevent direct entry?

    2) having done this, I tried changing a non-calculated field in the form. TF did not stop me. Switched to another form, switched back, changed field was still changed. This suggests to me that locking the form did nothing useful. The name of this field is used for access to compnaion forms…I’d rather it didn’t just succumb to accidental entry. Am I missing something?

    –Richard

    #48407
    Brendan
    Keymaster

    Hi Lane,

    I’m glad you’re managing to work through these issues. Welcome to the world of programming! Things don’t always go the way you hope or expect. That’s my life programming Tap Forms! :)

    A script is triggered, as you’ve found out, when the value in whatever field is reference by var some_value = record.getFieldValue('fld-.....'); changes.

    Thanks!

    Brendan

    • This reply was modified 3 years, 1 month ago by Brendan.
    #48405
    Lane Robinson
    Participant

    I’ll further add something that happened to me. This may or may not be something you are facing. I thought a script wasn’t executing properly. I eventually realized that it was getting data from another field that wasn’t updated yet. It was a calculation field that also references another field, and it’s turtles, always the way down. I’m rewriting my script to avoid this.

    #48403
    Lane Robinson
    Participant

    I recently learned that for Field Scripts, any time a field changes that is referenced in your script, the script will execute.

    With Form scripts that doesn’t happen. You manually run those.

    Here is where it states that in the documentation. https://www.tapforms.com/help-mac/5.3/en/topic/scripts

    #48402
    richard maliszewski
    Participant

    I am battling onward with my envelope-system. Have prototyped a “transfer” form…entries in a record therein, when my field script runs, create correct entries in both the “to” and “from” envelopes. But thus far, I’ve only been able to run the script from the script editor. It’s my intent to create a layout for this form with a commit button that runs this script. This has to be simple/obvious, but several searches for relevant posts haven’t gotten me anywhere yet.

    Any help for the blind here very appreciated.

    –Richard

    #48398

    In reply to: Task list

    loshen tashi
    Participant

    Thank you Brendan!
    I can see the thing with the Pick List but im not convice for my case.
    Maybe i can find a script in action with a sort of Task GTD thing?

    #48395
    Brendan
    Keymaster

    Hey Eddy,

    I moved this topic to the Using Tap Forms forum. It didn’t belong in the Script Talk forum where you posted it.

    So this used to work, but I’m not sure what happened to it. You used to be able to press down on the screen on the records list view to display the search commands. There was even voice search and you could tap a button to see the list of saved searches which you could then select. I didn’t change anything or remove that function in my code. I think with the removal of the Force Touch from watchOS 7, that feature simply vanished. I was trying to find a different way of engaging Force Touch, but it seems there’s no alternative. So I’ll have to think about what alternatives there can be for displaying that menu of search options.

    Thanks,

    Brendan

    #48389

    In reply to: Task list

    Daniel Leu
    Participant

    Certainly you can do this with a script. A while back, something along these lines was already discussed in the scripts forum.

    Cheers, Daniel

    ---
    See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricks

Viewing 15 results - 721 through 735 (of 2,989 total)