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 - 2,641 through 2,655 (of 3,049 total)
  • Author
    Search Results
  • #34134
    A Ibanez
    Participant

    Heya. Sorry for the unclear title, I will explain below.

    I’ve been using TapForms for years but I just realized how powerful it is with Calculations and Scripts. So I’m working on migrating an anime database to a new format.

    Here’s my situation.

    – I want to keep a numerical field called “MAL ID” that stores the ID of a series in myanimelist.net.
    – I want to generate a URL called “MAL URL” whose format would be “CONCAT(“https://myanimelist.net/anime/”, [MAL ID]”, where “MAL ID” is the value of the MAL ID field. This would for example create this URL: “https://myanimelist.net/anime/31240”
    – I’d like to store the value of the “MAL URL” field in a field of type “Web Site” called “Web Site” so I can click on it when I’m on my phone to visit it easier.

    I can generate the URL based on the MAL ID field, but I cannot figure out a way to bring the value of the “MAL URL” website to make it clickable in the “Web Site” field.

    To simplify my explanation, have a look at this screenshot:

    The MAL ID field is the only field that the user edits manually. Tapforms then generates the link to MyAnimeList using a Calculation field in “MAL URL”. Now I want to bring the value of MAL URL into “Web Site” keeping the “Web Site” field type.

    Is there any way to do this?

    Attachments:
    You must be logged in to view attached files.
    #34107
    Brendan
    Keymaster

    Hi Kirk,

    Thanks for the added details. I’ll look into this further based on your description.

    However, at the moment with the latest macOS and Xcode versions, I’m having troubles compiling a third party library I use, so once I get that all resolved, then I’ll be able to dig into this issue. I may need to contact the third-party library developer to see if they can help. Unfortunately it’s the CouchbaseLite database engine I use which isn’t compiling anymore, so it’s a pretty important piece of code.

    Thanks,

    Brendan

    #34103

    In reply to: QR Code Question

    Brendan
    Keymaster

    Hi Eddzo,

    There’s no access controls like that in Tap Forms. So that part wouldn’t work.

    The only two places QR codes are used in Tap Forms is for searching for the value of the scanned QR code and for entering in the data of the scanned QR code.

    However, with a script, you could have Tap Forms take the value of a scanned barcode and do something with it such as call out to your server and do something there.

    If you look at the Scripting chapter, you’ll see an example of fetching from a movie library web service for the given barcode value. You can add a Field Script which will trigger the script when a barcode is scanned into a field.

    Thanks!

    Brendan

    #34102

    In reply to: Sorting by position

    Brendan
    Keymaster

    Hi Antonio,

    Yes, I do use CouchbaseLite for Tap Forms. And yes you’re right, they do have geo spatial queries. In fact, the Mac version uses that on the Map View to fetch records that are within a certain geographic area as defined by the zoom level of the map. But it still fetches the records according to the defined Sort Field settings, not by distance to some arbitrary coordinate.

    There’s no auto-run function for scripts outside of a Field script that gets run when you modify a field that the script references. You can setup a shortcut key to run a Form Script though. You would have to manually trigger that when you select the form. You can also add a Run Script button to a custom layout to run a script too.

    You might be able to write some JavaScript to call out to a web service to figure out the distance between two points and then update a distance field within Tap Forms and then sort by that. Either that or if there’s a distance algorithm in JavaScript you could use, such as the Levenshtein distance algorithm. But that only gives you the distance between two points ‘as the crow flies’.

    #34099

    In reply to: Sorting by position

    Antonio Calanducci
    Participant

    Hi Brendan,

    thank you for the reply.
    What type of database are you using behind the scene to store data locally? As I see you support CouchDB syncing, this let me think that you could use Couchbase mobile, that should support geospatial queries. But as you are mentioning indexes in your answer maybe it’s not the case (I read somewhere you used to use SQLite, but not sure if this applies to the macOS version too).

    I haven’t yet taken a look to the Javascript APIs: is there some hook to run a script at a given time? For example, if I can set a trigger on form loading, I could run a script that takes my current position, calculate the difference between my position and every fields’s position and populate a distance field, so I can sort the records by this field. Is this what you meant above as “separate distance function” ?

    I know this is not optimal, but at least I could solve my problem for the moment.
    thank you

    #34089
    Brendan
    Keymaster

    Hi Keith,

    Not with a Calculation field, but it can be done using a Script field because Script fields can write their results to other fields. So you could write a script to gather your values from your fields in the record, then perform the same kind of calculation you would have done in the Calculation field, and then just write the result into your Rating field.

    Thanks!

    Brendan

    #34072
    Brendan
    Keymaster

    Hi Kimberly,

    You can also do something like this with a Calculation field or a Script field. It’s up to you.

    But in a Calculation field, the formula would simply be:

    "#" + Keyword

    Set the formula to return Text.

    Then in your Calculation field you’ll get #Keyword as the result, where the value of Keyword is whatever is in the Keyword field.

    Give that a try and if you’d prefer a script, let me know.

    #34069
    Kimberley Hoffman
    Participant

    Hi Brendan and the rest of the community,

    Could someone suggest a simple script for creating a hashtag out of a blog keyword?

    I have a file that is connected to my social media file planner. The purpose of the script is to automatically write a hashtag from a keyword. Both will appear in the editorial theme file which I will then copy and paste into wherever they belong. The keyword would be copied into Yoast for my WordPress blog , the hashtag would be copied into Instagram,Twitter or Facebook.

    i.e. Keyword = Mannheim; The result of the script should be #Mannheim

    I realize I could just use copy and paste from the keyword line in the file into the hashtag line. But it would be timesaving to automate that. Unfortunately I don’t know how to write scripts.

    Would somebody help me, please? Thanks.
    Kimberley

    #34047
    Brendan
    Keymaster

    Hi Joe,

    You could do that with the use of a hidden Script field that references your Item # field. You would have to load in the records of the Products form, loop through them and look for the record that contains the Item # specified. Then copy the values from the found record into the child record you added. I should probably add a proper search API to the Script feature so you wouldn’t have to write the code to loop through the records yourself.

    Other than that you’d have to just click on the checkmark button to display the popover with the list of child records, then type in your Item # and select the matching one from the list.

    Thanks,

    Brendan

    #34034
    joe omalley
    Participant

    Brendan…Thanks for the free invoice form! Question…Is it currently within the realm of Tap Forms to be able to automatically populate the description and the price of a product or service in a subform (table) when entering in the Item # column via dropdown from another form. Just wondering. This would be golden!

    #34027
    Paul
    Participant

    My apologies if the info I seek is already posted here, I have searched, but cannot find reference to what I’m looking for. I am very new to TapForms, sorry for the Noob inquiry.

    I work for a Utility company and we have a project coming up where we will need to do site surveys of over 130 sites throughout the region.

    Data that we need to capture for each site (utilizing TapForms) revolves around the door lock hardware. We will need to collect about 20 pieces of data per door such as: Lock hardware, condition, handing, material, etc. We will also want to have room for at least 3 photos per door and also room for comments. The sites range in size from 2 doors to 30 doors. The data (and photos) will then get imported into a database for future reference. It seems that the linking function will fit the bill, I’m just not familiar enough with its use to make it work properly.

    Is there a way that I can start a record called site, then add doors underneath that record? OR would it be best to have each door as a unique record? I’m trying to get around entering site name, address etc. multiple times per door for larger sites and streamline this process as much as possible.

    I hope this description makes sense. Thanks for your help, much appreciated.

    Paul

    #33928
    Kirk Williams
    Participant

    Thanks Brendan! Sorry, I’m very new to TF and am likely over-complicating this description. To hopefully clarify, what’s not updating is the picklist on the child form when additions are made to its linked parent form. So the parent has records “A”, “B” & “C” – all of which are available in the child’s linked picklist. When entering a record in the child form, I realize I need a “D” parent, so I go to the parent form (either using a new window or by switching to it) and add it. When I return to the child, “D” does not appear unless the entire TF file is closed & re-opened.

    #33883
    Brendan
    Keymaster

    Hi John,

    Tap Forms is doing the TOTAL() because you have a Link to Form field there and it doesn’t know which record to use, so the only choice is an aggregate calculation for the field from all the linked records.

    You’ll have to add your Calculation field to the Filament form instead. Make sure you have the “Show Inverse Relationship” option enabled. Now, if the relationship between your forms is a one-to-many then on your Filament form you can access directly the parent field’s Filament Used (mm) field to do your calculation. But if it’s a many-to-many or a Join Link Type, then that won’t work.

    With a Form Script or a Script Field you could write some JavaScript to pick out an individual record from the Cost per mm Link to Form field and then use that value in your calculation.

    Thanks,

    Brendan

    #33878
    Brendan
    Keymaster

    Hi Stephen,

    Excellent! I’m glad that has helped a bit.

    Tap Forms will write a bunch of the Script code for you by using the Snippets provided and just by double-clicking on the fields in the Fields list on the Script Editor. So you can do some basic stuff quite easily there.

    I know, easier said than done :) Hopefully it won’t be too difficult for you to learn a bit of JavaScript.

    Thanks,

    Brendan

    #33876
    Stephen Froggatt
    Participant

    Thank you, Brendan, very much indeed.
    Your reply is crystal clear and helps me understand better how the Linked Forms work.
    I have moved some of the fields around a bit on my forms so that they are now referenced in the correct direction. Everything now works as intended!
    You have also inspired me to learn some JavaScript programming in order to make use of “calculation fields on steroids!”
    Many thanks again for your full, prompt and helpful response.
    Every blessing,
    Stephen

Viewing 15 results - 2,641 through 2,655 (of 3,049 total)