Search Results for 'script'
-
Search Results
-
A javascript runs correctly with a “hard coded” field_ID. It fails however if the field_ID is retrieved using the functions ‘form.getFieldNamed(‘field_name’)’ and ‘object.getId()’.Can anyone see why this might not work? I intend to use this function in ALL of my forms. Hence the need to source the field_ID from its ‘field name”.Thanks for any help.The code is quite straightforward (you can substitute any field id below to test it). If the user enters “XXYY” in the field, it should set that field to ‘null’:function Script() {// ***** OPERATES CORRECTLY *****:// the following two lines of code work correctly (when the field id// hardcoded).var analysis_g2_fld_id = ‘fld-37435e1d73024374b4700105e49993c9’;var analysis_g2_value = record.getFieldValue(‘fld-37435e1d73024374b4700105e49993c9’);// ***** FAILS *****:// the following three lines of code do NOT work// (ie. when the field ID is sourced via functions). If the three// lines of code below are executed in a “form level script”, it does// work. It is only when in a “field level script” that it fails.// analysis_g2_obj = form.getFieldNamed(‘Analysis_G2’);// var analysis_g2_fld_id = analysis_g2_obj.getId();// var analysis_g2_value = record.getFieldValue(analysis_g2_fld_id);if (analysis_g2_value == “XXYY”)record.setFieldValue(analysis_g2_fld_id, null);return 0;}Script();form.saveAllChanges();
Topic: Reference Radio Buttons
I have a field for progress Status, it’s formatted as radio buttons from a pick list with 3 values – Pending/Actioned/Archived.
I would like to set the record colour based on this status. null/yellow/green.
I have used the set record colour attribute before, but only set from a tick box, so the logic was simple. Try as I might, I cannot find how to achieve what I want. How is the value of a Radio Button field stored & referenced in the script, for example? I’ve tried as if it were the text, and if it was stored as a number, but no success thus far.
Any advice?
Many thanks, Stephen.
Hello,
following assumption:
I have two forms:
form 1
form 2
I have a script in form 1 (not a script field). How can I get the records that are in form 2 from form 1 and display it in the console?
I tried several days but I can not access the records in form 2.
Regards from germany.
Topic: Probably a stupid question
I am very new to tapforms having just downloaded the trial on my Mac and then just bought the iOS version this morning and all my playing so far has been on iPhone.
Basically I want to use it to keep a database of movies but not really in the sense of a standard movie database. I basically want to keep track of which tracks on a blu ray disc are which.
so I basically backup all my physical discs and either store them as entire backup folders or ISO for playback in home theatre. I also sometimes make an mkv instead and one of the issue with creating an mkv file from a blu ray disc is that a blu ray disc is full of playlist and video files and they are joined up in a certain way to give you the episode or movie you want to watch. If you don’t have the menus (because you are trying to pull a movie or an episode out of the whole disc and save it as a single mkv file) then it can be hard to keep a track of which playlist is the one you want. Once I have figured this out I want to keep the data.
so basically I have a video form which represent a movie or episode or equivalent. That form has some fields (eg. mpls, title, type etc). The mpls is the playlist file that is the one I care about in this instance. An mpls file links 1 or multiple m2ts files together to give you the video you want. So I have a table inside the form as well with the list of segments that make up this video. So far so good.
Then each m2ts file contains a number of streams (video, audio and maybe subtitles). Right now I have this as another table.
ok, so far so good.
So, now I can have another form for a physical disc that can link to a number of these video forms to represent the individual videos I care about on that disc. So that means I can quickly lookup and find out all the different info about the streams and segments.
So that table describes the videos on a disc that I care about and that’s part of what I want.
but now I also want another form that I will call MKV which I want to represent each mkv file I create from these videos. So when I take a video form item I will extract the video and make an mkv file so the mpls and m2ts segments used to make that mkv file are the same between the 2 forms so I can just join or link. However the tricky thing is that when I make an mkv file I do not keep all the streams. I just take the streams I want (ie. The video, the English, maybe the Japanese and some or none of the subtitles). So when I create a new MKV form I would like it to point to my “Video” form which has all the mpls and segment info and they are the same but then I want to select some of the streams from the stream table that is in the video form and I can’t figure out how to do it. Each time I create an mkv it would need to be a manual human action to tick the ones I want or something similar and then have them stored in the mkv form as a table. The data stored for each stream can be the same but I just don’t want all streams. The closest I could think of was some sort of pick list that I could populate with a table form another form. It would still be uglier than I would like but it might be ok but it also doesn’t work as I can’t populate a picklist with the contents of a table in a specific video form entry.
Is there some way to script what I want? I guess I could create a separate stream form that is keyed by the video title and then within the “video” form I can use a join to collate them all back up into a full list and then have some sort of 1 to many table in the mkv table so I can select all the streams I want?
is this the best/only way to do it?
im not sure if I’ve totally lost everyone with my rambling description….
any advice appreciated!