Brian Dunning's FileMaker Custom Functions

WrapupLine ( test ; lineheader, linedata )

If data exists for a field, give it a bold label and show it.

  Average rating: 4.5 (22 votes) Log in to vote

Dwayne Wright   Dwayne Wright - Show more from this author
Dwayne Wright

Share on Facebook Share on Twitter

  Sample input:
= field name<br> <br> Record 1<br> <Name> Dwayne<br> <Title> Dev<br> <br> Record 2<br> <Name> Jane Doe<br> <Title> (null) </div> </div> <div class="codewrapper">  Sample output:<br> <div class="code"> Record 1<br> Name: Dwayne<br> Title: Dev<br> <br> Record 2<br> Name: Jane Doe </div> </div> </div> <div style="clear:both;"></div> <p>  Function definition:<span class="grayital"> (Copy & paste into FileMaker's Edit Custom Function window)</span> </p> <textarea name="textarea" class="codearea" readonly id="textarea" style="height: 250px;">If ( IsEmpty(test) ; "" ; "ΒΆ" & TextStyleAdd ( lineheader & ": " ; Bold ) & linedata ) // Brought to you by Dwayne Wright -</textarea> <button id="copyBlock" class="cool_button">Click to copy</button> <span id="copyAnswer" class="redital"></span> <script type="text/javascript"> var textarea = document.getElementById( "textarea" ); var answer = document.getElementById( "copyAnswer" ); var copy = document.getElementById( "copyBlock" ); copy.addEventListener( 'click', function ( e ) {; try { var ok = document.execCommand( 'copy' ); if ( ok ) answer.innerHTML = 'Copied'; else answer.innerHTML = 'Unable to copy'; } catch ( err ) { answer.innerHTML = 'Unsupported Browser'; } } ); </script> <p> You may want to concantenate multiple fields into a single text string with a boldly formated label in between. You don't want to show the label if the field is empty. </p> <p> </p> <h2>Comments</h2> <p><a href="/filemaker-custom-functions/account.php">Log in to post comments.</a> </p> <p> </p> <blockquote> <p class="redital">Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.</p> </blockquote> </div> <div id="support" style="max-width: 800px;"> <h1>Support this website.</h1> <p>This library has been a free commmunity resource for FileMaker users and developers for 16 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth:</p> <form id="form1" name="form1" method="post"> <select name="amount" id="amount"> <option value="5.00">$5</option> <option value="10.00" selected="selected">$10</option> <option value="15.00">$15</option> <option value="20.00">$20</option> <option value="25.00">$25</option> <option value="35.00">$35</option> <option value="50.00">$50</option> <option value="75.00">$75</option> <option value="100.00">$100</option> </select> </form> <div id="paypal-button"></div> <script src=""></script> <script> paypal.Button.render( { style: { size: 'small', tagline: false }, env: '', // 'sandbox' or 'production' client: { sandbox: 'AYWWhKxNdh7GjhfyNhq4h0feDRQsqepeEhHkHD1hootJyuPNQ0hxmhdf3T49Lc3qhPPf9jmUMTk_nQT3', production: 'AQPRbrw3dbvIbG4dCRGSw2r4dwOH8TUTDiqy3ngZv_aomVtb2NwBJltoOvZZpmlYdLZHzRQFsBBw1sq8' }, commit: true, payment: function ( data, actions ) { return actions.payment.create( { payment: { transactions: [ { amount: { total: document.form1.amount.value, currency: 'USD' } } ], redirect_urls: { return_url: '/filemaker-custom-functions/tip.php?x=43' } }, experience: { input_fields: { no_shipping: 1 }, presentation: { brand_name: ' FileMaker Custom Functions' } } } ); }, onAuthorize: function ( data, actions ) { // Make a call to the REST API to execute the payment return actions.payment.execute().then( function () { actions.redirect(); } ); }, onCancel: function ( data, actions ) { window.alert( 'Your transaction has been canceled.' ); } }, '#paypal-button' ); </script> </div> </div> <div style="text-align: center;"> <footer>Other resources: <a href="">ZIP Code web services</a> <a href="">User-Agent web services</a> <a href="/sample-data">Sample data</a> <a href="">Contact</a> </footer> </div></body> </html>