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,156 through 1,170 (of 2,951 total)
  • Author
    Search Results
  • #45331
    Brendan
    Keymaster

    Hi Tom,

    The act of choosing a folder from the user interface is what gives Tap Forms permission to access files within that folder.

    Tap Forms can have a different Script Folder for each document. Could it be that you were working with multiple documents and it just seemed like you had set it before but because it was a different document it hadn’t been set yet?

    #45328
    Tom Kerswill
    Participant

    Hi

    Quite often when writing a new script and pointing to a new file, I get undefined when doing getJsonFromUrl() or getTextFromUrl()

    I’m pretty certain this is due to permissions errors. Is there any way of catching an error in Tapforms script and seeing what the error is from a call like this? At the moment it’s impossible to distinguish between permissions errors or something else.

    What I’ve found in the past is that I’ve had to go into Tapforms preferences, and choose a comletely different folder for script folder access, and then set my chosen one again. But this always seems a bit flakey; sometimes when I go back into preferences the folder apparently hasn’t changed.

    I’m also not certain it works if you set a higher-up folder. E.g. ideally I’d like to set my “Documents” folder, but this doesn’t seem to always allow access to files in subfolders.

    Is there perhaps a different way to set permissions? Or perhaps Tapforms could ask for permissions when something tries to access a folder for the first time, using the Security preferences etc.

    Thanks in advance,

    Tom

    #45324
    T.L. Ford
    Participant

    I’m glad the scripting tutorials are useful. Eventually, I really need to get around to 103. :)

    #45318
    Stephen
    Participant

    Hi,

    I’ve created a field script to colour a record green when the task is complete. All looks great in the desktop version, clearly brightly filled rows in the linked table display of records.
    In iOS the view is slightly underwhelming & easily missed that tasks are complete, just a subtle coloured line at the top of the record once you tap to enter the linked form, no clear indication whilst viewing the table list of records.

    Is there anyway of making this colour change more obvious to mobile users at a glance?

    Thanks in advance for any suggestions, Stephen.

    #45315

    In reply to: Help with script

    Sam Moffatt
    Participant

    This one is a fun one, TF doesn’t track users but devices. It has a modified by device field but that can change if someone modifies it (which makes sense). You can do a ‘created by device’ or ‘record author’ by doing the following.

    First step is to add a new field of type ‘Modified by Device’. You’ll need it’s field ID from below the description field. The second step is to create a new text field to store the ‘created by device’ or maybe ‘record author’. The reason to use text field is so you can override it later, especially as your old records will be likely wrong. The third field is a script field that looks something like this:

    function Set_Record_Author() {
    
    	var record_author = record.getFieldValue('fld-471ac88b92364a228d9fec90d9a5347b');
    	
    	if (!record_author) {
    		var deviceToAuthor = {
    			"pancake": "Sam",
    		};
    
    		var device = record.getFieldValue('fld-0bbeb9cfa1024c11a624ed63cc8200e0');
    		
    		record.setFieldValue('fld-471ac88b92364a228d9fec90d9a5347b', deviceToAuthor[device] ? deviceToAuthor[device] : device);
    		document.saveAllChanges();
    	}
    }
    
    Set_Record_Author();
    
    • fld-471ac88b92364a228d9fec90d9a5347b is the ID of the Modified By Device field
    • fld-0bbeb9cfa1024c11a624ed63cc8200e0 is the ID of the Record Author field

    This creates a one time copy of the modified by field to our field though if you delete the contents of the text box it will reset. It also maps the device name (in my case my laptop is called pancake because it was thinner than my older laptop) to a human name as well but falls back to device name if there isn’t a match.

    function Aggregate_By_Date() {
    	// set our date format, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString
    	// remove "day" from it and you'll roll up by month for example.
    	var dateFormat = { "day": "2-digit", "month": "2-digit", "year": "2-digit"};
    	
    	// this is where we're going to store the rollups per day.
    	var rollups = {};
    	
    	// iterate to all of the records in the form
    	for (var rec of form.getRecords()) {
    		var marketplace = rec.getFieldValue('fld-c163aba17ae64c4d93b5a53819a139dc');
    		var purchase_date = rec.getFieldValue('fld-ccbd9a8f51d34246bebfb31aa4e397dd');
    		var price = parseFloat(rec.getFieldValue('fld-08129d71ab0f4fa4a2749456281fca07'));
    
    		// Skip entries that don't have a price or date set.
    		if (!price || !purchase_date) {
    			continue;
    		}
    		
    		// format the date for use in the rollup.
    		var formattedDate = purchase_date.toLocaleDateString("en-AU", dateFormat);
    
    		// Rollup to this date, add to the existing value or set it if not set.
    		if (!rollups[formattedDate]) {
    			rollups[formattedDate] = { [marketplace]: price };
    		} if (!rollups[formattedDate][marketplace]) {
    			rollups[formattedDate][marketplace] = price;
    		} else {
    			rollups[formattedDate][marketplace] += price;
    		}
    	}
    	
    	// log to console the aggregated values.
    	for (var month in rollups) {
    		for (var marketplace in rollups[month]) {
    			console.log(month + ", " + marketplace + ": $" + rollups[month][marketplace]);
    		}
    	}
    }
    
    Aggregate_By_Date();
    

    First change is to get the extra field, I used marketplace since I was testing against my products document but replace it with the field ID we just created.

    Second change is to how we do the rollup to add multiple dimensions (in this case, marketplace). For each dimension we need to check if it exists and create it if it doesn’t. If both date and marketplace are set, the else handles adding values together.

    The last change is to the output loop to iterate over each day and each “marketplace”.

    You’re using the script that doesn’t hit the rollup form but if you want to use it, you’ll need to add a new field to it and then where there is the addNewRecord line add an extra setFieldValue after it with the new field ID:

    function Aggregate_By_Date() {	
    	// this is where we're going to store the rollups per day.
    	var rollups = {};
    	//var marketplaces = new Set();
    	
    	// iterate to all of the records in the form
    	for (var rec of form.getRecords()) {
    		var marketplace = rec.getFieldValue('fld-c163aba17ae64c4d93b5a53819a139dc');
    		var purchase_date = rec.getFieldValue('fld-ccbd9a8f51d34246bebfb31aa4e397dd');
    		var price = parseFloat(rec.getFieldValue('fld-08129d71ab0f4fa4a2749456281fca07'));
    
    		// Skip entries that don't have a price or date set.
    		if (!price || !purchase_date) {
    			continue;
    		}
    		
    		// format the date for use in the rollup.
    		var formattedDate = purchase_date.getFullYear() + "-" + purchase_date.getMonth() + "-" + purchase_date.getDay();
    		
    		//marketplaces.add(marketplace);
    
    		
    		// Rollup to this date, add to the existing value or set it if not set.
    		if (!rollups[formattedDate]) {
    			rollups[formattedDate] = { [marketplace]: price };
    		} if (!rollups[formattedDate][marketplace]) {
    			rollups[formattedDate][marketplace] = price;
    		} else {
    			rollups[formattedDate][marketplace] += price;
    		}
    	}
    	
    	// Get the rollups form.
    	var rollupsForm = document.getFormNamed("Rollups");
    
    	// Delete previous roll up records.
    	rollupsForm.getRecords().forEach(rollupRec => rollupsForm.deleteRecord(rollupRec));
    	
    	var lines = [];
    	
    	// log to console the aggregated values.
    	for (var month in rollups) {
    		for (var marketplace in rollups[month]) {
    			var line = month + ","  + marketplace + "," + rollups[month][marketplace];
    			console.log(line);
    			lines.push(line);
    
    			var rollupRec = rollupsForm.addNewRecord();
    			rollupRec.setFieldValue("fld-cd1d454672c84bce8103a4267507ca03", month);
    			rollupRec.setFieldValue("fld-4c9f208bb5ed406489a54a76d4b6cd18", marketplace);
    			rollupRec.setFieldValue("fld-9eeeff7120db401b830ccec4e06f2bc3", rollups[month][marketplace]);
    		}
    	}
    	
    	document.saveAllChanges();	
    
    	Utils.copyTextToClipboard(lines.join("\n"));
    }
    
    Aggregate_By_Date();
    
    #45313

    In reply to: Help with script

    Guillermo q
    Participant

    Sorry to bother you again guys.

    With this code you gave me:

    function Aggregate_By_Date() {
    	// set our date format, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString
    	// remove "day" from it and you'll roll up by month for example.
    	var dateFormat = { "day": "2-digit", "month": "2-digit", "year": "2-digit"};
    	
    	// this is where we're going to store the rollups per day.
    	var rollups = {};
    	
    	// iterate to all of the records in the form
    	for (var rec of form.getRecords()) {
    		var purchase_date = rec.getFieldValue('fld-ccbd9a8f51d34246bebfb31aa4e397dd');
    		var price = parseFloat(rec.getFieldValue('fld-08129d71ab0f4fa4a2749456281fca07'));
    
    		// Skip entries that don't have a price or date set.
    		if (!price || !purchase_date) {
    			continue;
    		}
    		
    		// format the date for use in the rollup.
    		var formattedDate = purchase_date.toLocaleDateString("en-AU", dateFormat);
    
    		// Rollup to this date, add to the existing value or set it if not set.
    		rollups[formattedDate] ? rollups[formattedDate] += price : rollups[formattedDate] = price;
    	}
    	
    	// log to console the aggregated values.
    	for (var month in rollups) {
    		console.log(month + ": $" + rollups[month]);
    	}
    }
    
    Aggregate_By_Date();

    I have a field depending on who added this field (my wife or me). I would like this report by day, but with XX or XY depending on who added the field and the price.

    Thank you very much, you helped me a lot.

    #45312
    Kimberley Hoffman
    Participant

    Thanks, Brendan. I do follow Sam on YouTube. However, I realise I need to learn the basic vocabulary in order to string sentences together. Thank you for linking to JavaScripting 101.

    On the bright side of life, despite my struggle with the scripting, I did manage to turn out a work-around without one. And I was super happy that I could filter information easily and quickly for this data bank. That won me back time that I otherwise would have lost had I not set up the forms. Thanks.

    #45309
    Brendan
    Keymaster

    Not sure if you noticed, but I put links to TL Ford’s Scripting 101 tutorials and Sam’s scripting video tutorials on my Support page:

    Support

    #45302

    In reply to: Mail Merge not working

    Sam Moffatt
    Participant

    My brother says the hardest part about coding is knowing what you result you want to appear.
    I beg to differ. I know what I want to appear, but don’t know the magic formula for that yet.

    Once you know how to code I can see the first taking over but you’ve got to learn how to put the code together. That takes some time to figure out the pieces.

    So I will repeat my (thought) process here, maybe you will see my error:
    1. I import a list of 6 digit series numbers as a .csv file into the file “Seriennummern”. The .csv-file is exported from Numbers, so I reduce the likelihood of typos.You can easily create an ascending digit column in Numbers by typing in the first two fields, marking them and dragging the curser down the column.

    At some point this should become a script you run in TF to generate the entries so you don’t have to import a CSV file just to generate a series.

    2. I input information in the print registry, like Title, format, etc.
    3. I choose the “Zertifikatsnummer”. I have this as a one to many field
    4. The series of the certificate numbers, “Fortlaufende Hologrammnummern der Serie” is also a one to many field. Explanation: I must express in the certificate print form how many of Print X is made and what series numbers this print edition will have.
    5. I will print out the certificate, affix the appropriate hologram to both the print and the certificate

    Are both of these link to form fields (“Zertifikatsnummer” and the “Hologrammnummern”) linking to the same “Seriennummern” form? Or are they different series?

    I think what you are saying is that it is just better to copy and paste the serial number and the range of serial numbers into a document until I have finished my baby steps. Right?

    There was a quote I heard the other day that “You need to get things done before you get bored with them” and I’d substitute “bored” with “frustrated” in this case. There is a pragmatic path to getting unblocked and the long term process improvements. Learning when you’re stressed is a path to more stress :) Solve the initial problem and come back to making it better :)

    (But I still think that having the certificate databank in Tapforms is the best solution for my records, even if I cannot automatically output a certificate. I can add the images and still have a record of the series of certificate numbers)

    So, I have taken a work-around, because it is impossible to understand/learn coding on the fly for me. I have added some extra fields to copy and paste my numbers into. That does let me do a simple range.

    It isn’t an elegant solution, but it will work for me. Thanks for all your efforts on my behalf.

    It’s not an elegant solution but it’s something that enables us to have something that works and we can go from there. On the script talk basic information on scripting topic I had started to add some logging. If you run this in the script editor, you should see some output on the console log area on the right:

    function Get_Zertifikatsnummer() {
    
        // Get the Zertificatsnummer from the Seriennummern form
        var Seriennummern_form_id = "fld-123…";
        var Seriennummern_form = record.getFieldValue(Seriennummern_form_id);
        console.log(Seriennummern_form);
        var name_id = 'fld-abc…';
        var name_value = Seriennummern_form
            .map((rec) => rec.getFieldValue(name_id))
            .join(", ");
    
        console.log(name_value);
    
        // Get the Print Registry, create a new record in it and set the value in a field
        var get_zertifikatsnummer = document.getFormNamed("Print Registry");
        var field_id = "fld-xyz…";
        var seriennummer_record = get_zertifikatsnummer.addNewRecord();
        console.log(seriennummer_record.getUrl());
        seriennummer_record.setFieldValue(field_id, name_value);
    
        form.saveAllChanges();
    }
    
    Get_Zertifikatsnummer();
    

    This should output some information to help understand the internal state of the script and why things are empty…or where they start being empty :)

    #45288
    Sam Moffatt
    Participant

    I feel the hardest aspects of programming is mapping your mental model to what the computer is doing and forming that understanding. That isn’t easy to do and I’m not sure there are any good shortcuts for what will help you make that jump. here are some tools that help me.

    The Tap Forms Script Editor is perhaps a rough start to learning to code because it’s not a fully featured editor. That’s where online tools like an online Javascript beautifier like beautifier.io comes in handy for spotting missing brackets or jslint.com can point out that you’re reusing a variable or that a variable isn’t defined (though make sure to tell jslint about record, form, document in it’s globals section). It also can complain about stuff like long lines but that isn’t really too much of a concern.

    If your script stops working (parse error) and you don’t understand why this line is he problem you can use multiline comments to disable bits of your code and then progressively add more lines. You start by commenting a large chunk you don’t know about and then progressively expand the lines, generally top down. Take your example elsewhere on the forum:

    function Get_Zertifikatsnummer() {
    
    // Get the Zertificatsnummer from the Seriennummern form
    
    var Seriennummern_form_id = 'fld-123…';
    var Seriennummern_form = record.getFieldValue(Seriennummern_form_id);
    var name_id = 'fld-abc…';
    var name_value = customers_form.getFieldValue(name_id);
    }
    
    // Get the Print Registry, create a new record in it and set the value in a field
    
    var Print_Registry_Form = document.getFormNamed("Print Registry")
    var name_id = 'fld-xyz…';
    var seriennummer_record = get_zertifikatsnummer.addNewRecord
    get_zertifikatsnummer.setFieldValue(field_id, name_value);
    
    form.saveAllChanges()
    
    }
    

    We can probably spot this using the earlier tools easily but let’s add a multiline comment (they start with /* and end with */):

    function Get_Zertifikatsnummer() {
    
    /*
    // Get the Zertificatsnummer from the Seriennummern form
    
    var Seriennummern_form_id = 'fld-123…';
    var Seriennummern_form = record.getFieldValue(Seriennummern_form_id);
    var name_id = 'fld-abc…';
    var name_value = customers_form.getFieldValue(name_id);
    }
    
    // Get the Print Registry, create a new record in it and set the value in a field
    
    var Print_Registry_Form = document.getFormNamed("Print Registry")
    var name_id = 'fld-xyz…';
    var seriennummer_record = get_zertifikatsnummer.addNewRecord
    get_zertifikatsnummer.setFieldValue(field_id, name_value);
    
    form.saveAllChanges()
    */
    }

    Ok this gives no errors, it also does nothing but it doesn’t fail. Let’s move it down line by line until we hit an error:

    function Get_Zertifikatsnummer() {
    
    // Get the Zertificatsnummer from the Seriennummern form
    
    var Seriennummern_form_id = 'fld-123…';
    var Seriennummern_form = record.getFieldValue(Seriennummern_form_id);
    var name_id = 'fld-abc…';
    var name_value = customers_form.getFieldValue(name_id);
    /*
    }
    
    // Get the Print Registry, create a new record in it and set the value in a field
    
    var Print_Registry_Form = document.getFormNamed("Print Registry")
    var name_id = 'fld-xyz…';
    var seriennummer_record = get_zertifikatsnummer.addNewRecord
    get_zertifikatsnummer.setFieldValue(field_id, name_value);
    
    form.saveAllChanges()
    */
    }
    

    You can see I’ve moved the line with /* on it down the script, when we introduce the line it causes an error that customers_form isn’t defined. Let’s fix that and move one more line:

    function Get_Zertifikatsnummer() {
    
    // Get the Zertificatsnummer from the Seriennummern form
    
    var Seriennummern_form_id = 'fld-123…';
    var Seriennummern_form = record.getFieldValue(Seriennummern_form_id);
    var name_id = 'fld-abc…';
    var name_value = Seriennummern_form.map((rec) => rec.getFieldValue(name_id)).join(", ");
    }
    /*
    
    // Get the Print Registry, create a new record in it and set the value in a field
    
    var Print_Registry_Form = document.getFormNamed("Print Registry")
    var name_id = 'fld-xyz…';
    var seriennummer_record = get_zertifikatsnummer.addNewRecord
    get_zertifikatsnummer.setFieldValue(field_id, name_value);
    
    form.saveAllChanges()
    */
    }
    

    Ok now we get our parse error and it’s obvious this line is causing an issue and that’s because an extra } that shouldn’t be there.

    One last thing to do is to use console.log or just return stuff early. I’ve attached some screenshots from a simple test form that validated pulling values from the links that I used in the mail merge thread. Now I’ve done this pattern a bunch of times but I still built that line up, testing the output as I went in the output area to make sure it made sense. Now when you have some data you want to capture mid execution, then console.log will help you dump it. Here’s your script with some extra console.log statements sprinkled in:

    function Get_Zertifikatsnummer() {
    
        // Get the Zertificatsnummer from the Seriennummern form
        var Seriennummern_form_id = "fld-123…";
        var Seriennummern_form = record.getFieldValue(Seriennummern_form_id);
        console.log(Seriennummern_form);
        var name_id = 'fld-abc…';
        var name_value = Seriennummern_form
            .map((rec) => rec.getFieldValue(name_id))
            .join(", ");
    
        console.log(name_value);
    
        // Get the Print Registry, create a new record in it and set the value in a field
        var get_zertifikatsnummer = document.getFormNamed("Print Registry");
        var field_id = "fld-xyz…";
        var seriennummer_record = get_zertifikatsnummer.addNewRecord();
        console.log(seriennummer_record.getUrl());
        seriennummer_record.setFieldValue(field_id, name_value);
    
        form.saveAllChanges();
    }
    
    Get_Zertifikatsnummer();
    

    This puts into your console area of the script editor some extra information (conosle log also available at the bottom of the record view on the right) to help you triage and if you’re outside the script editor, it gives you a clickable link to the record you just created (the getUrl line).

    These little things help me all of the time debug and understand something I don’t fully understand…yet :D Hope it helps!

    Attachments:
    You must be logged in to view attached files.
    #45284

    In reply to: Mail Merge not working

    Sam Moffatt
    Participant

    As an aside, it might be easier to just have a text field for the series number and manage it manually, especially if sometimes it comes from one place and sometimes another. If you’re only excluding numbers within a range (e.g. 20, 21 and 22 in the example), then you could still script it though it’s a little more work to mask those numbers but not impossible.

    One other thought is to copy/paste through an online Javascript beautifier like beautifier.io. Attached is what it looked at a first pass (I also had to fix the smart quotes). The indentation change makes it clear where the problem is and taking it out results in everything being indented properly. If I move over to jslint.com I can paste it and it’ll give me a slightly different error message:

    1. [JSLint was unable to finish] Expected ‘(end)’ and instead saw ‘}’.
    }

    Here is the code with a few more changes, but it still won’t work:

    function Get_Zertifikatsnummer() {
    
        // Get the Zertificatsnummer from the Seriennummern form
    
        var Seriennummern_form_id = "fld-123…";
        var Seriennummern_form = record.getFieldValue(Seriennummern_form_id);
        var name_id = "fld-abc…";
        var name_value = Seriennummern_form.getFieldValue(name_id);
    
        // Get the Print Registry, create a new record in it and set the value in a field
    
        var get_zertifikatsnummer = document.getFormNamed("Print Registry")
        var name_id = "fld-xyz…";
        var seriennummer_record = get_zertifikatsnummer.addNewRecord();
        seriennummer_record.setFieldValue(field_id, name_value);
    
        form.saveAllChanges()
    
    }
    

    Why won’t it work? Well this line:

        var Seriennummern_form = record.getFieldValue(Seriennummern_form_id);
    

    This line doesn’t return a Tap Forms record but returns an array of records, perhaps think of it like a bag. You need to loop over it to get a scalar or single value. Now there is a kind of quick way that will get you a comma separated list of fields, it looks like this:

        var name_value = record.getFieldValue(Seriennummern_form_id).map((rec) => rec.getFieldValue(name_id)).join(", ");
    

    This is a bit of black magic and is a little unreadable but unpacking:

    • record.getFieldValue(Seriennummern_form_id) will give us all of the child records, I’m assuming this is your link to the serial number form.
    • map is a special function that says take this value (in case rec which is technically a TFFormEntry) and then replace it with the result of the other command (in this case rec.getFieldValue(name_id) which I’m guessing is the serial number). So now instead of it all being child records, it’s the serial numbers.
    • Now that we’re dealing with just the serial numbers in the array, we can do join(", ") to make them into a comma separated list (technically it’s comma and then space since it’s ,).

      I suspect that’s what you’re after and will give you a quick start for that field. You could still loop to replace contiguous numbers but I feel doing some of it by hand might be ok whilst you learn.

      Here’s my final script with a few extra changes. I ran this through JSLint and fixed each of it’s complaints (e.g. there wasn’t a field_id and there was two name_id fields, so I renamed the second one to be field_id). I also added a call to the function, otherwise the script will do nothing (e.g. the Get_Zertifikatsnummer(); line at the end).

      function Get_Zertifikatsnummer() {
      
          // Get the Zertificatsnummer from the Seriennummern form
          var Seriennummern_form_id = "fld-123…";
          var name_id = "fld-abc…";
          var name_value = record.getFieldValue(Seriennummern_form_id)
              .map((rec) => rec.getFieldValue(name_id))
              .join(", ");
      
          // Get the Print Registry, create a new record in it and set the value in a field
          var get_zertifikatsnummer = document.getFormNamed("Print Registry");
          var field_id = "fld-xyz…";
          var seriennummer_record = get_zertifikatsnummer.addNewRecord();
          seriennummer_record.setFieldValue(field_id, name_value);
      
          form.saveAllChanges();
      }
      
      Get_Zertifikatsnummer();
      

      One other note, if there is a field in this form that links to the Print Registry then you should use record.addNewRecordToField(link_field_id) which will not only create a new record in the target form for you but also create the linking metadata as well.

    Attachments:
    You must be logged in to view attached files.
    #45278

    In reply to: Mail Merge not working

    Kimberley Hoffman
    Participant

    I was looking through the script forum. This seems close but it isn’t exact: https://www.tapforms.com/forums/topic/how-to-get-and-add-data-from-other-form/

    I got it up to here:
    function Get_Zertifikatsnummer() {

    // Get the Zertificatsnummer from the Seriennummern form

    var Seriennummern_form_id = ‘fld-123…’;
    var Seriennummern_form = record.getFieldValue(Seriennummern_form_id);
    var name_id = ‘fld-abc…’;
    var name_value = customers_form.getFieldValue(name_id);
    }

    // Get the Print Registry, create a new record in it and set the value in a field

    var Print_Registry_Form = document.getFormNamed(“Get Zertificatesnummer”)
    var

    Am I getting close? The top part seems to turn up without error, but the field is empty. Or am I looking in the wrong direction?
    Thanks
    Kimberley

    #45277
    Kimberley Hoffman
    Participant

    I have the same problem. I really don’t know where to start because I am usually facing scripts when I have no time to learn them – kind of like a deer facing the headlights of an oncoming truck. Right now, I am guessing what might work, but have no idea how to connect it to what I am doing.

    #45273

    In reply to: Mail Merge not working

    Kimberley Hoffman
    Participant

    Hi Brendan,
    Thanks for getting back to me so fast. I had originally used “Edition Nr.” but changed it, forgetting to correct it in the layout.

    For the series numbers, I need to display

      A certain certificate number that I get from the hologram label (Zertifikatsnummer)
      A specific range of certificate numbers, i.e 000019 to 000023 (or however high the edition is), but not all the certificate numbers that I enter in the second form

    I am not quite sure what kind of script I would need to apply to those two.(get records?) (My head begins to send panicky smoke signals when someone says “script”.)
    Thanks
    Regards,
    Kimberley

    #45271

    In reply to: Mail Merge not working

    Brendan
    Keymaster

    Hi Kimberly,

    The only one I see not working is [Edition Nr.]. But in your fields list you have it defined as Edition Nummer. All the others appeared to be substituted properly when you print.

    For the series numbers, you won’t be able to reference those in your record directly. Since it’s a one-to-many, is it ALL of the series numbers that you want to display that are related to the parent record? You would most likely need a script field to extract the data from the Link to Form field to get the list of series numbers to include in the report.

    Thanks,

    Brendan

    • This reply was modified 4 years, 2 months ago by Brendan.
Viewing 15 results - 1,156 through 1,170 (of 2,951 total)