Hide empty merge fields

Hi!
I am merging address book fields into a Pages document, but not all of the address book contacts have data in all of the fields in the Pages document. When I go to print, the empty fields show up in the document with the field name (e.g. Other Names). I'm wondering if there is a way to hide the fields in the document when they contain no data. Any ideas…?
Thanks!

// run the query; if it fails, print out the error message and terminate the script
$result = mysql_query($QrySQL) or die('Query failed: ' . mysql_error());
//if there isn't a row to fetch, then mysql_fetch_assoc() will return FALSE.
if ($row = mysql_fetch_assoc($result)) {
    //$row now contains an associative array of the field names to their values in the first row
    $firstSeen = $row['FirstSeen'];
You could loop through the result set by replacing that if with a while. If you wanted to find out how many rows were returned, you could use mysql_num_rows().

Similar Messages

  • How to hide empty data fields (php users only)

    how do you suppress the display of a given field if it has no value in a database (see code below)? You can take a look of the printscreen also.
    Thanks
    <td align="center" valign="middle"><span class="STYLECENTER"><img src="<?php echo $row_DetailRS2['thumbnail1']; ?>" alt="" name="" border="1" /></span><span class="STYLECENTER"><br />
              <?php echo $row_DetailRS2['code1']; ?></span></td>
            <td align="center" valign="middle"><span class="STYLECENTER"><img src="<?php echo $row_DetailRS2['thumbnail2']; ?>" alt="" name="" border="1" /></span><span class="STYLECENTER"><br />
              <?php echo $row_DetailRS2['code2']; ?></span></td>
            <td align="center" valign="middle"><span class="STYLECENTER"><img src="<?php echo $row_DetailRS2['thumbnail3']; ?>" alt="" name="" border="1" /></span><span class="STYLECENTER"><br />
              <?php echo $row_DetailRS2['code3']; ?></span></td>
            <td align="center" valign="middle"><span class="STYLECENTER"><img src="<?php echo $row_DetailRS2['thumbnail4']; ?>" alt="" name="" border="1" /></span><span class="STYLECENTER"><br />
              <?php echo $row_DetailRS2['code4']; ?></span></td>
            <td align="center" valign="middle"><span class="STYLECENTER"><img src="<?php echo $row_DetailRS2['thumbnail5']; ?>" alt="" name="" border="1" /></span><span class="STYLECENTER"><br />
              <?php echo $row_DetailRS2['code5']; ?></span></td>

    // run the query; if it fails, print out the error message and terminate the script
    $result = mysql_query($QrySQL) or die('Query failed: ' . mysql_error());
    //if there isn't a row to fetch, then mysql_fetch_assoc() will return FALSE.
    if ($row = mysql_fetch_assoc($result)) {
        //$row now contains an associative array of the field names to their values in the first row
        $firstSeen = $row['FirstSeen'];
    You could loop through the result set by replacing that if with a while. If you wanted to find out how many rows were returned, you could use mysql_num_rows().

  • Why do I see blank fields that I chose to hide empty fields when when emailing a confirmation?

    I have chosen to to not include empty fields when emailing a confirmation, yet I still see the blank fields. What can I do to remove these fields from appearing in my confirmation email?

    Hi;
    I believe you are speaking of the "Email Notification" that you, as the form Author recieve, which is setup on the "Email Notifications" sub-tab of the "Options" tab.  In that email notification there is not an option to hide the blank fields.  In the "Email Reciepts" sub-tab of the Options tab is where you configure email receipts sent to the form submitter, on that tab you can choose to incude the data but hide the blank responses, but that does not affect the email notification that you, as the author recieve.  That email notification, if you choose to include the data, will always show all fields.
    Let me know if that was not correct and you are saying that the email reciept to the submitter is showing blank fields when it should not.
    Thanks,
    Josh

  • Merge field won't display if number is 0.00

    When the value 0.00 is brought into the word document via merge field, nothing displays.  If the value is greater than 0.00, it displays that value.  Is there way to display the 0.00?

    To control number & currency formatting in Word, add a numeric picture switch to the mergefield. To
    do this:
    • select the field (e.g. «MyData»);
    • press Shift-F9 to reveal the field coding. It should look something like {MERGEFIELD MyData};
    • edit the field so that you get {MERGEFIELD MyData \# $,0.00} (or whatever other numeric format you prefer - see below);
    • position the cursor anywhere in this field and press F9 to update it;
    • run your mailmerge.
    Note1: The '\# $,0.00' in the field is referred to as a numeric picture switch. Other possibilities include:
    • \# 0 for rounded whole numbers
    • \# ,0 for rounded whole numbers with a thousands separator
    • \# ,0.00 for numbers accurate to two decimal places, with a thousands
    separator
    • \# $,0 for rounded whole dollars with a thousands separator
    • \# "$,0.00;($,0.00);'-'" for currency, with brackets around negative numbers and a hyphen for 0 values.
    The precision of the displayed value is controlled by the '0.00'. You can use anything from '0' to '0.000000000000000'. 
    If you use a final ';' in the formatting switch with nothing following, (eg \# "$,0.00;($,0.00);") zero values will be suppressed. Note that this suppresses 0s resulting from empty fields and from fields containing 0s.
    If the above doesn't resolve your issue, it may be that the expected zeros are actually empty fields. In that case, you should be able to get the desired output by embedding the MERGEFIELD in a formula field, thus:
    • select the field (e.g. «MyData»);
    • press Ctrl-F9 to embed the field in another field, thus { «MyData» };
    • edit the field code so you get {=«MyData» \# $,0.00} (or whatever other numeric format you prefer);
    • position the cursor anywhere in this field and press F9 to update it;
    • run your mailmerge.
    Cheers
    Paul Edstein
    [MS MVP - Word]

  • Show or Hide empty table based on If condition

    I want to show or hide empty table based on condition. The table will be empty with 5 rows,2 cols and should display if <?Rout_Information1_id1?> is blank or null or when XML field is not present. Actually the JDEdwards report will generate XML file. In the XML file if <?Rout_Information1_id1?> is present it will have definitely value like 'PULL' or 'Cut' otherwise sometimes XML field itself will not be present. Need to display the empty table when the <?Rout_Information1_id1?> is not present. I am trying to do as below but the table is not displayed. Can someone tell me how to resolve this.
    <?if:Rout_Information1_id1=' '?>
    5 rows,2 cols table
    <?end if?>
    Thanks,
    Vijay Vattiprolu

    Ok. I used the below syntax from other post and it resolved displaying empty table issue.
    <?if:not(XML_TAG_NAME)?>
    <?end if?>
    Thanks,
    Vijay

  • Hide empty column

    hello,
    I am looking for the easiest way to hide empty columns in
    'REUSE_ALV_GRID_DISPLAY'.
    I know i can work my way through the field catalog.
    I am just curious if there is a parameter that helps me to achieve this goal.
    thank you!
    Werner

    Hi,  you need to handle this manually when building your field catalog.  For example.
    data: is_not_initial type c.
    is_not_initial = space.
    loop at itab where not fld1 is initial..
         is_not_initial = 'X'. 
         exit.
    endloop.
    if is_not_initial = space.
      fc-no_out = 'X'.
    endif.
    Regards,
    Rich Heilman

  • Hide grand total field on ALV report, But keep the sub total fields

    Dear Experts,
    1) How to hide grand total field on ALV report, But keep the sub total fields.
    2) How to populate rate per ton & calculate total price according to the qty in delivering document.

    Dear Experts,
    1) How to hide grand total field on ALV report, But keep the sub total fields.
    2) How to populate rate per ton & calculate total price according to the qty in delivering document.

  • Hide Unwanted Excise Fields in MIGO & J1IEX

    In our business process, the duties such as NCCD and SED are not required and consequently we don't want these fields to appear in MIGO and J1IEX so that users can't put any value by mistake.
    Can any one provide some idea what the settings required for this?
    Thanks in advance

    Hi,
    To hide some fields in MIGO, NEED to do configuration settings. Then you can hide the required fields. The pathway as follows...
    SPRO->SAP REFERENCE IMG->NATERIAL MANAGEMENT->INVENTORY MANAGENET AND PHYSICAL INVENTORY->SETTINGS FOR GOODS MOVEMENT(MIGO)---> FIELD SELECTION FOR MIGO(CHACK THE RADIO BUTTON FOR HIDE AGAINST THE REQUIRED FIELD).
    By following path way you can hide the required fields in MIGO.
    For J1IEX also there are options to hide the fields. I hope this will clear your issue. Thanking you.

  • SharePoint 2013: Hide/Show Column fields while uploading document in Document Library

    Dear all,
    I have created a document Library LIB001 and I have created One Column of type Choice, drop down list, (CCHOICE) and I have created 3 other columns, (Column1, Column2, Column3).
    What I want is while uploading a file in the document library, when I choose a certain value from CCHOICE, i want to show/hide and/or make the column mandatory.
    Can anyone help/guide me how to achieve this?
    Many Thanks
    Vinay

    Dear all, I am trying the following code, but it's not entering the onchange of drop down list event. <script> $(document).ready(function () { var countryField = SPUtility.GetSPField('Document Type'); var countryFieldValue = countryField.GetValue(); alert
    (countryFieldValue); // ----- Hide/Show the field based on new selected value. var id = SPUtility.GetSPField('Document Type').Dropdown.id; alert ('field ID: '+id); $('#' + id).on('change', function () { alert ('Inside on Change:'+countryFieldValue); if (countryFieldValue
    == 'Type1') { SPUtility.GetSPField('Column1').Hide(); } else if (countryFieldValue == 'Type2') { SPUtility.GetSPField('Column2').Hide(); } }); }); </script> Can anyone help me please. Many Thanks & Regards Vinay

  • EMOD - Parse error while using merge fields

    Hello Everyone,
    We are using EMOD for email campaigns. We have renamed "Contact" object to "Rep Contact". When I insert merge fields on Rep Contact object, I get parse error message...
    Parse error in file at line 40: Could not find matching '}' for reference to variable at line 39
    Has anyone else come across this? Are there any restrictions in EMOD for using merge fields?
    Thanks.

    Thanks VK. I checked the source code and it is still perplexing why this error is coming up. It works fine without merge fields. I am pasting the section of html code with merge fields...
    <tr>
    <td valign="top" width="25" bgcolor="#ffffff"> </td>
    <td valign="top" bgcolor="#ffffff"><font face="Arial, Helvetica, sans-serif" style="font-size: 12px">Hello</font> ${Rep Contact.First Name} 
    <p><font face="Arial, Helvetica, sans-serif" style="font-size: 12px">What if there&rsquo;s another flash crash? What if we enter a double dip? These are just a few fears weighing heavily on investors&rsquo; minds in today&rsquo;s environment of uncertainty. <sup>1</sup> </font></p>
    <font face="Arial, Helvetica, sans-serif" style="font-size: 12px">
    <p>View or download: <a>3 ways to address risk-averse clients&rsquo; needs</a>.</p>
    </font>
    </td>
    </tr>

  • How do you get the custom fields added to a address book to show up on Pages 09 when merging fields?

    I created some custom fields in the address book and want to get them merged into a Pages 09 document.  When using the merge fields feature in Pages, only the standard fields are displayed.  I am looking for a way to have the custom fields from the address book inserted into the document.

    I believe you will find them if you go to table - unhide all columns.  When you drag and drop card(s) into pages, it automatically shows default fields.  The others are there but hidden.  I hope this works for you!

  • Merge Fields in Word Templates are still showing after replaceing procedure

    Hi all,
    we are using CRM 7.0 and we are using the BAdI CRM_OFFICE_TEMPLATE_BADI to replace the Merge Fields which are placed in Word  Template!
    Normaly it works very fine, but in some cases if there is no value to fill into the merge field, the merge field is shown like it is created in the template.
    In most of the other cases the not replaced merge field is not shown in the created document.
    Does anybody has got the same issue? If yes, how do you solve it?
    Every answer is very welcome!
    Best regards
    Michael

    Hi Michael / Carsten,
    I have some problems in implementing CRM_OFFICE_TEMPLATE_BADI. I have redefine method for get_attributes :
    method IF_EX_CRM_OFFICE_TEMP_BADI~GET_ATTRIBUTES.
      DATA: ls_attr TYPE CRM_KW_TEMP_ATTR,
            lt_attr TYPE CRM_KW_TEMP_ATTR_TAB.
    *  IF iv_wsname = 'ZTESTQUO001'.
        ls_attr-NAME = 'CustomAddr'.
        ls_attr-DESCRIPTION = 'Custom Address'.
        INSERT ls_attr INTO TABLE lt_attr.
        ct_attributes = lt_attr.
    *  ENDIF.
    endmethod.
    and redefined method get_values also:
      DATA: ls_val TYPE CRM_KW_TEMP_VALUE,
            lt_val TYPE CRM_KW_TEMP_VALUE_TAB.
    *  IF iv_wsname = 'ZTESTQUO001'.
        ls_val-NAME = 'CustomAddr'.
        ls_val-VALUE = 'Sudirman Street 20' .
        INSERT ls_val INTO TABLE lt_val.
        ct_values = lt_val .
    *  ENDIF.
    The field has shown when I click "Call BADI" on Document templates, but I couldn't click CustomAddr field (no hyperlink in it). could you explain to me what steps are wrong ? How to make this field shown in the schema structure in Microsoft Word 2007 ?
    Your help is greatly appreciated.
    Thank you.
    Agus

  • Adding a merge field to an email hyperlink in a word 2010 email mailmerge

    I am using word 2010, excel 2010, and outlook 2010 to send out the following email with email mailmerge to 50 + people.
    The highlighted names in the greeting are two merge fields - First_Name and Last_Name.
    The hyperlink is an email hyperlink to the following email message:
    Will you attend?   ___ Yes   ___  No
    The hyperlink is as follows:
    I would like to place the merge First_Name Last_Name in the hyperlink to sign the RSVP email back to me. I have tried many modifications of the hyperlink code and nothing works consistently. It will place one name as the signer but will not pick up
    the following names the merge fields.
    I would like the final email hyperlink to look like this:
    Will you attend?   ___ Yes   ___  No
    Jody Smith
    Can anyone tell me how to add the First_Name Last_Name to the hyperlink email so that each ricipient's name from the original email will appear in the hyperlink email as shown
    above?
    Thanks!
    Ben

    Hi All,
    To help other community members who may have similar problem, I quote Peter Jamieson's answer here:
    (Edited a little...)
    I can get this to work here, but there are some things you need to pay attention to when merging to HTML email (rather than to new documents etc.).
    The Hyperlink field code I start with is as follows:
    { HYPERLINK }
    Insert that using ctrl-F9 to insert the special field brace pair { }, insert the Word HYPERLINK, then select the field and update it using F9.
    View the field code results (press Alt-F9 if necessary). In the English language version of Word you should see 
    Error! Hyperlink reference not valid.
    Important point number 1:
    Do not update the result of this HYPERLINK field again (i.e. don't select it and press F9). If you do, every email will always show the same link text. As
    far as I can remember, this behaviour is different when you merge to a document rather than email, or perhaps merge to attachments. This can be a problem if you need to update other fields in your email, or if the email is being used by other people who might
    (for whatever reason) update the HYPERLINK field
    Now modify the display text.
    Use the Arrow keys to move the insertion point so it is between the "E" and the "r" in the Word "Error", and type
    Click here to RSVP!
    Then you can select and delete the "E", and the "rror! Hyperlink reference not valid."
    Select the text and apply the Hyperlink style to it (Home tab of the Ribbon->Styles).
    When you toggle field code display using alt-F9, you should see the original field
    { HYPERLINK }
    Now click after the K of HYPERLINK and insert the following fields and text (or copy them from somewhere else):
     "{ SET x 1 }mailto:*** Email address is removed for privacy ***?subject=July%20Wine%20and%20Spine%20&body=%20Will%20you%20attend?%20%20%20___%20Yes%20%20%20___%20No%0A%20%0a%2{
    MERGEFIELD First_Name%20{MERGEFIELD Last_Name }"
    so that your field now looks like
    { HYPERLINK "{ SET x 1 }mailto:*** Email address is removed for privacy ***?subject=July%20Wine%20and%20Spine%20&body=%20Will%20you%20attend?%20%20%20___%20Yes%20%20%20___%20No%0A%20%0a%2{
    MERGEFIELD First_Name%20{MERGEFIELD Last_Name }" }
    As usual, all the {} need to be the special field code brace pairs that you can enter using ctrl-F9 on WIndows Word.
    At this point, experienced field users will have to resist the temptation to select the fields and update them. Dont do it!
    Save the document.
    Test the email merge. At this point, I would hope to see the results you want.
    If not, I do not know why this works OK on my system but not yours.
    Important point number 2 You may be wondering why
    there is a { SET x 1 } field inside the HYPERLINK code. It's because when you are working with a .docx, if you save, close and reopen your document, you may find that Word has resolved all the merge fields nested inside your HYPERLINK field (i.e. replaced
    the field codes by their results). This behaviour can appear arbitrary, and the reason that (for some reason), Word does not resolve the nested fields if there is a Word bookmark inside the HYPERLINK field. Now if the insertion point or selection ws inside
    the HYPERLINK field when you save/close the document, there will be a bookmark in there, because Word inserts a bookmark called _GoBack, which enables the user to go back to the previous selection. But if you click outside the HYPERLINK field before you save,
    there wil be no such bookmark and Word will resolve your field codes. So we put the { SET x 1 } in there to ensure that there is a bookmark (in this case, called X) to prevent that from happening.
    Alternatively, if you save as .doc format (not recommended these days if you can avoid it) Word does not resolve these fields and you don't need the { SET } field.
    And that's it. Whether that will be enough for your Merge to work as you hope, I cannot be sure, but all I can say is that without doing those 2 things, it almost certainly
    won't.
    [[I originally had a third thing. I actually now think it's incorrect, but I'm going to leave it here just in case.
    Important point number 3: If it does not work, there is
    at least one other thing that could be wrong, although I think it is highly unlikely. There is a Windows registry setting called FieldCalcSecurityLevel, which was introduced about 12 years ago when Microsoft made some security-related changes to the behaviour
    of certain types of field. I'm not going to step through how to look for that, but for example, in my registry, for Word 2010, it is at
    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Options
    It may be elsewhere.
    If you cannot find that Option, or it is there and is set to the default value (1), then something else is wrong and I do not know what it is. However, if it is set to 0 (which
    makes Word use its original behaviour, you will have to set it to 1 to get this to work.
    Thanks for your understanding.
    Steve Fan
    TechNet Community Support

  • Issue with Duplicate Merge Fields in PDFs

    I have been utilizing merge fields from our Salesforce instance into our Forms and Contracts for a couple of years now and have never come across this issue.  Since we utilize Salesforce, we will have certain merge fields duplicated on multiple pages.  For instance, the Record Owner's Name and Firm from their User records will be on different pages, but will be coming from the same source and need to show the same information.  Everything seems to be fine once the documents have been merged, it is printing that is causing the issue.
    If I place "Master.Owner_Name" into the PDFs on multiple pages, it will change the name to "Master.Owner_Name#1" and "Master.Owner_Name#0".  So now when our users are printing the documentation, the fields are printing out vertically.
    Has anyone seen this issue before and how were you able to resolve?
    Thank you for any assistance you can provide!

    PDF forms are not Salesforce forms and do not work in the same way.
    Within a PDF form any field with same type of field and same name will share the same value.
    All fields should be uniquely named.
    LiveCycle form behave differently and do support same field names with different values unless a field is configured as a global field.
    The usual way to have multiple copies of a from within a single PDF is to use a template to make the multiple copies and uniquely name the fields on the copy of the form.

  • Creating an empty signature field in Acrobat Pro X

    I want to make an empty signature field in Acrobat Pro X, so that Acrobat Reader users can later sign it. I know how to enable that last part ("extended PDF Reader"), but don't know how to make an empty field.

    Is a blank signature field what I need to create if I want my document to be signed by someone else? I am just the editor of the document. I will not officially sign the document. The signature will come from a managment postion. Everytime I try to create a blank signature field though Adobe wants to sign the document with my personal signature.

Maybe you are looking for

  • Need BAPI for F-54 Clear Vendor Down Payment

    HI Gurus, Is there any BAPI available for clearing vendor down payment? We can use F-54 tcode to do it manually. I need to clear the vendor down payment from an USER-EXIT. how can I do this? Pls guide me. Thanks & regards, Murphy

  • Free/Busy not working after mailbox migration to Exchange 2013

    I'm in the process of migrating user mailboxes from Exchange 2007 to Exchange 2013 It seems that many of the users (not all) are having problems seeing free/busy once they have been migrated.  If we remove the Outlook profile and recreate it, all is

  • Cannot run project - Cannot find config file bc4j.xcfg (9.0.5.2)

    Hi all, I've gotten myself in a situation and can't find my way out. I've got a project that does not use any business components. Just as a test, I created a business component (View Object, I think - can't remember for sure), and then deleted it an

  • Double Images in e-mail

    I have a problem e-mailing images with Aperture. I export them for e-mail, attach them to an e-mail and send. The images arrive to the intended person fine, except along with them comes duplicate files, which have no actual image associated with them

  • Run time error: Templates and DLL�s

    I am developing on a Sun Solaris box in C++. I have a function that I want to be dynamically linked at run time. CALLEDB.cc is my function. CALLINGA.cc is my user's source. In CALLINGA.cc is the function prototype extern void CALLEDB(thing1 &, thing2