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 - 1,741 through 1,755 (of 2,989 total)
  • Author
    Search Results
  • #41758
    cf
    Participant

    I should clarify that my request for a “button” field type can essentially be restated as “make scripts more easily accessible when viewing a record details screen on iOS”. Unlike the records list screen where favorite scripts can be more easily surfaced (ad Daniel Leu pointed out), the details screen requires more taps to get to the scripts, and the popup form is harder to thumb-reach than the action sheet.

    That said, in my opinion the best way to trigger scripts on the record details screen is to offer a button/action field type. This gives us the flexibility to decide which scripts should be easily triggered and even lay it out in the field as desired (and even use other scripts to show/hide the button like any other field).

    I really think that a button field type that triggers a script can have wide-reaching implications for what kind of powerful work flows can be enabled in tap forms with very little effort.

    #41757
    cf
    Participant

    There is already a button where you can favorite scripts. This button doesn’t appear if you don’t have a script marked as favorite…

    Thank you for the suggestion. Yes I have seen that this is possible but as you mentioned this does require more interaction than just having a button right there in the form. Additionally it’s more setup, having to create a script for each action record.

    As far as the prompter goes it doesn’t seem offer a way to select from a list of actions, seems like the inputs on the prompter are fairly limited. In any case a prompter would also be more than just one-tap and go.

    To clarify the relative dates thing, you want a formatter to display as “18 days ago” or similar?

    Yes, rather than requiring the use of a script to accomplish this I feel like a formatter is a better solution. It is actually supported natively in iOS (see RelativeDateTimeFormatter here and here). This would allow the actual data value backing the row to remain unchanged, only having the formatter used for rendering the date/time.

    #41756
    Sam Moffatt
    Participant

    I haven’t seen #1 on your issues list but I’ve seen issues where it doesn’t launch the right document from cold start (though I’m not sure I’ve seen it recently, I usually make sure TF is warm and on the doc I want) and I have seem sometimes scripts don’t execute at all. That’s a new quirk!

    To clarify the relative dates thing, you want a formatter to display as “18 days ago” or similar?

    I’d also like the ability to set a default value on location fields to default to set current location just like you can default the date fields to set current date. Getting it via a script would be good as well but having it as default would alleviate some of the pain as I feel it could safely run in the background and set the field value once it’s stable.

    #41751
    Daniel Leu
    Participant

    1 A new “button” field type that runs a script for that specific record.

    There is already a button where you can favorite scripts. This button doesn’t appear if you don’t have a script marked as favorite… For the least amount of GUI interactions, create a script for each activity and mark them as ‘favorite’ in the options inside the script editor. Obviously you could use the prompter feature and just use one script. But then you have one more ‘click’ to do.

    Yep, if there is only one script, it would be nice if it is directly executed.

    Cheers, Daniel

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

    #41740
    cf
    Participant

    I just recently started using TapForms and this is amazing. I can’t believe this app isn’t better known. I’ve tried many different options for organizing my information (Notion, Coda, AirTable, MyBase, and many more) and none come close to the functionality I wanted or in many cases their performance was terrible. TapForms hits the right balance of capability and simplicity.

    When did I...? screenshot

    TapForms is beginning to replace multiple apps with its flexibility. One example is an app called “When did I…?”. The premise is simple, it just has a list of actions on the main screen, like “walked the dog” or “washed the car” etc… and you tap one of the rows to log that action (see screenshot above). That’s it. I was able replicate this functionality in TapForms with two tables and a script:

    The first table is a list of actions which includes a field that calculates the relative time string (“1 hour ago” etc…) based on the last recorded event. This mimics the main screen of WDI. There is a one-to-many field to a history table that holds the individual history items for all actions. This is like the middle tab of WDI. The default style of entering data in a form is a bit tedious compared to WDI: I would have to select an action, select the linked field, hit “+”, tap to set the date, tap to set the date. The thing that makes WDI great is the one-tap quick logging of events like this.

    As a workaround I created a script that adds a linked entry with the current datetime pre-filled, but it also takes several taps to get to scripts so I abused the ability to run scripts via URL to create a “button” on each action record. Basically, this is a URL field where the URL is a TapForms link to run a script with parameters containing the name of the action to log. With one tap I can now easily log that event (almost, I have to navigate to the action details first but this is a huge improvement). See screenshot attached for example.

    Amazingly this works! Though there are a few issues.

    1. When navigating back and forth from the documents screen TapForms keeps trying to run whatever the last script was run when opening the document. I’m guessing the parameters from the URL are held in some state somewhere and persisting after the script is run, but not sure why it would even try running the script in the first place. Quitting and relaunching the app works around this, I suppose I should also try just opening a URL the clears the params as the last step of the script.
    2. The relative date string has to be manually refreshed
    3. I use the “mask field value” option to hide the URL itself but it seems the mask will just replace each character its masking with “.”, which for really long URLs doesn’t look great.
    4. The summary badge on the “history” linked field is truncated on iOS(see screenshot attached)

    I imagine you already have a large backlog but here’s my feature requests for what it’s worth.

    1. A new “button” field type that runs a script for that specific record.
    2. A date format option for relative dates.
    3. Ability for scripts to fetch location.

    TapForms screenshot screenshot

    One thing that WDI does is that every time you log an event it automatically tracks the current location. I wasn’t able to replicate this since scripts don’t seem to be able to fetch location data so #3 would fix that. Right now I have a script that calculates the relative date but having that be a formatting option on dates would be more flexible since it would happen whenever a call is rendered which is useful for relative dates.

    But most of all, #1. This would be the most powerful addition to TapForms. Right now we can run a script on a whole form or on an individual field, but no way to run a script for a single selected record. The idea is: you would select the “button” field type and select which script for it to run, and possibly some input params. The script would run for that record only when the button is tapped. This small change could have a big impact on the type of workflows forms can be used for.

    #41724
    Brendan
    Keymaster

    Hi Dave,

    Thanks for the feedback.

    1. That’s right. To print a custom layout you need to select the record details option.

    2. Yes, that’s right. This is by design. By turning off Multiple Records per Page, you can print the same label over and over again on the page.

    3. This is because when you have a Link to Form field, the parent record is one thing, but there can be many child records, so displaying them as a table of values is an appropriate display format. However, on a child form, you can add a Calculation or Script field that references fields from the parent. This works with the One to Many Link Type.

    4. That’s right. It’s because normally you use the labels layout to printout labels, so you wouldn’t want a header to be printed at the top of your labels sheet. But I know it would be useful to have a header if you were using the labels layout just to organize the printout differently than just for labels.

    5. The Default Layout is dynamically generated, so I can tell the size needed for printing before it’s printed. On a custom layout, you choose the dimensions of every element. But yes, it would be good to have some sort of sliding fields capability. It wouldn’t really work for a custom layout though. At least not in its current design.

    6. Hmm… Sorry about that. You can click on the Layers tab to find all objects in your layout, even if they’re outside the printable area and you can delete them from there.

    There aren’t really any workarounds for the issues you’ve brought up other than using the Calculation or Script field features.

    Thanks,

    Brendan

    #41706
    T.L. Ford
    Participant

    Thanks! The defaultValue documentation version just hasn’t gotten to me yet, but I used it anyway for faster data entry with a couple sometimes-repetitive fields. I really adore Tap Forms and it’s wonderful that you are actively working on it.

    Script field code below is provided for other people who might find it useful. As a record gets added, the default value changes to the current data so it isn’t necessary to enter it on subsequent records unless the value changes (i.e. it’s easy to enter multiple books by the same author purchased in the same year).

    function Change_Default_Values() {
    
    	var author_id = 'fld-d3d7e4d8d3104c70a002ba5016f597c1';
    	var year_id = 'fld-a6fa7f9e718640d0b52c6f3baa5a40db';
    
    	var author_fld = form.getFieldWithId(author_id);
    	var year_fld = form.getFieldWithId(year_id);
    
    	var author = record.getFieldValue(author_id);
    	var year = record.getFieldValue(year_id);
    		
    	if (!author) { author = ""; }
    
    	author_fld.defaultValue = author;
    	year_fld.defaultValue = year;
    	
    	document.saveAllChanges();
    
    }
    
    Change_Default_Values();
    #41700
    T.L. Ford
    Participant

    I was also looking for a script way to set bold/italic.

    My preference would be for:
    setNoteFieldValue() to take 3 arguments where the last one is true/false for “am I providing HTML” with a default of false.

    NSAttributedString ought to have a function for converting an HTML string. If it fails, it could just toss it in as plain text or throw the error with “dolt. format your html right” except said more politely.

    As a random side note, my forum search turned up a post titled:
    Feature request: markdown format support in notes field
    which appears to be on the private Beta Team Forum (and clicking on it did not go to the post, but went to the Membership page header).
    Which suggests you are already studying this puzzle, or have studied it, or have added it or decided it was more trouble than it was worth.

    #41690
    T.L. Ford
    Participant

    record.setNoteFieldValue() needs a ‘ in the example.
    record.setNoteFieldValue(field_id, ‘note_value’);

    #41685
    T.L. Ford
    Participant

    This database is a writing tool that generates random plots that you can then use as a framework for your owns stories.

    The derived data is based on the book, PLOTTO by William Wallace Cook, and the generated random plots cite the original text location by page, clause, and conflict.

    From a Tap Forms perspective, the ‘Build Plot’ script shows how to use Configuration options that are stored in a form within your script, and how to add a record and make that record active when the script ends. It also demonstrates some JavaScript syntax for sorting, filtering, text substitution, and RegExp. It’s also got some pretty gnarly recursion.

    Information and download here:
    http://www.cattail.nu/tap_forms/plotto_william_wallace_cook_tap_forms/index.html

    #41684
    T.L. Ford
    Participant

    In search of non-script way to do case sensitive searches, preferably via regex support.

    Would also like an easy way to do a simple group by query, returning a recordset of unique rows of just those fields. i.e. show me unique values for these fields (category, subcategory, etc.).

    Would also like more sort fields, perhaps even named sorts, like there are named searches.

    Thanks!

    – T

    #41682
    Sam Moffatt
    Participant

    Do you record multiple measurements for a contender or a single measurement record that is updated over time? If you’re not making multiple measurements for a single contender, I’d have a single form and use sections to group fields together which would side step the need for the script field.

    #41680
    T.L. Ford
    Participant

    Are the two forms linked? It almost sounds like birthdate only belongs in the contenders form, however, the thing you asked for would use a script field on your measurements form that finds the correct record on the contenders form and updates the field. Code to do that depends on if you have the two forms linked or not.

    Did you see my scripting tutorial? Good intro level if you aren’t already a programmer, although it doesn’t answer this precise question. http://www.cattail.nu/tap_forms/tap_forms_scripting_101/index.html

    Give us a little more information on how you have your forms set up so we can help.

    #41678
    John Duijker
    Participant

    I use 2 forms: one containing name and personal info (like date of birth) named <CONTENDERS> and a second one form containing info about personal measurements (name, length, weight, testscores, etc) named <MEASUREMENTS>.

    I want to add birthdate in form <Measurements> automatically from the form <contenders> using a script. But I have no experience in building a script.
    Can someone help me out, start me up

    Thanks,

    #41661
    Rocky Machado
    Participant

    Hi Team – Is it possible to delete photos using a script? I didn’t see any methods in the Javascript API. I’m able to cycle thru the photo object, but could not find a method to delete a photo.

    thanks,
    rocky

Viewing 15 results - 1,741 through 1,755 (of 2,989 total)