Hide a table row if the data field is empty

I know this sounds easy and it would be if I were doing it with my own data.
But I'm writing html that is being copied into an online form processor call "Absolute Form Processor" to be used to generate a report within in the software.
It works great if I create every row in the table but I'd like to hide the rows that don't have a field value so that the report is more concise.  I hope that makes sense.
The data accessed by surrounding the field name with "$$".  For example:  $$ed2_1$$.
What kind of script do I need to write to hide a row if there's no data?
Here's the code:
<table width="95%" border="1" cellspacing="0" cellpadding="5">
                <tr>
                    <th colspan="2">Education and Experience Information</th>
                    </tr>
                <tr>
                    <td width="18%">School/Experience:  </td>
                    <td width="82%">$$ed1_1$$</td>
                    </tr>
                <tr>
                    <td>Degree/Position:  </td>
                    <td>$$ed1_2$$</td>
                    </tr>
                <tr>
                    <td>Major/Minor:  </td>
                    <td>$$ed1_3$$</td>
                    </tr>
                <tr>
                    <td width="18%">School/Experience:  </td>
                    <td width="82%">$$ed2_1$$</td>
                    </tr>
                <tr>
                    <td>Degree/Position:  </td>
                    <td>$$ed2_2$$</td>
                    </tr>
                <tr>
                    <td>Major/Minor:  </td>
                    <td>$$ed2_3$$</td>
                    </tr>
                <tr>
                    <td>School/Experience:  </td>
                    <td>$$ed3_1$$</td>
                    </tr>
                <tr>
                    <td>Degree/Position:  </td>
                    <td>$$ed3_2$$</td>
                    </tr>
                <tr>
                    <td>Major/Minor:  </td>
                    <td>$$ed3_3$$</td>
                    </tr>
                <tr>
                    <td>School/Experience:  </td>
                    <td>$$ed4_1$$</td>
                    </tr>
                <tr>
                    <td>Degree/Position:  </td>
                    <td>$$ed4_2$$</td>
                    </tr>
                <tr>
                    <td>Major/Minor:  </td>
                    <td>$$ed4_3$$</td>
                    </tr>
                </table>
Any help would be most graciously accepted.
Kim

Hi
try this
<%
'Check a variable isn't "empty"
Function IsBlank(ByRef TempVar)
     'by default, assume it's not blank
     IsBlank = False
     'now check by variable type
     Select Case VarType(TempVar)
         'Empty & Null
         Case 0, 1
             IsBlank = True
         'String
         Case 8
             If Len(TempVar) = 0 Then
                 IsBlank = True
             End If
         'Object
         Case 9
             tmpType = TypeName(TempVar)
             If (tmpType = "Nothing") Or (tmpType = "Empty") Then
                 IsBlank = True
             End If
         'Array
         Case 8192, 8204, 8209
             'does it have at least one element?
             If UBound(TempVar) = -1 Then
                 IsBlank = True
             End If
     End Select
End Function
%>
Example usage
<%
If IsBlank("Degree/Position:")Then
     Response.Write "the default text or nothing goes here"
End If
%>
You could also use "if ¦IsBlank" to only include the item if it has content, to do what you require.
PZ
Message was edited by: pziecina

Similar Messages

  • Problem with the date field in Table Control

    I have created a table control in my module programming. One of the column in the table control is a date field which is I/O field.
    Now if I enter a value in date field column and hit enter the date field is reset. I dont want the field to get reset and accept valid date field.
    I have set type of the column as DATS and I havent used any dictionary fields. The column is from the internal table in the program.
    Please suggest

    In your PAI, in the LOOP AT <itab> did you
    - check date validity
    - update internal table
    * Sample
    LOOP AT itab.
      FIELD itab-field MODULE checkfield.
      MODULE updateitab.
    ENDLOOP.
    Look also at SAP documentation like [Table Controls|http://help.sap.com/abapdocu/en/ABENTABLE_CONTROL1_ABEXA.htm] or [Table Controls in ABAP Programs|http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dbac9f35c111d1829f0000e829fbfe/frameset.htm]
    Regards,
    Raymond

  • I have a numbers spreadsheet for tracking company data.  I want to copy the format of the spreadsheet (rows, columns,and formulas) but have all of the data fields be blank for the new year.  How do I do that?

    I have a numbers spreadsheet for tracking company data.  I want to copy the format of the spreadsheet (rows, columns,and formulas) but have all of the data fields be blank for the new year.  How do I do that?

    click and hold on one cell, then drag to select the range, then release, then type the delete key.  Only inlude cells in the range you do not want to keey the contents of the cell.  You can remove one-off cells by holding the command key and clicking cells to add or remove as needed.
    You can download the Numbers users guide here:
    http://support.apple.com/manuals/#productivitysoftware

  • Adobe Form - Hide a table row if a condition met

    Hi Helper
    I am learning how to use Adobe Form - and I am trying to hide a table row if a condition is met by using Formcalc/Jave script - but I donot know how - I was told that I can use "....presence = 'hide'  " property in on of the event(?) but donot know how to write the qualified name for the varable row and what event to use. Could someone please show me how
    Points will be rewarded.
    Thanks

    Hi Liem,
    Here is some more information:
    1)
    Accessing data in Table Cell
    xfa.resolveNode("xfa.data.my_data.tableData[" + this.parent.index  + "].column1").value
    2)  Accessing data nodes in Context
    xfa.datasets.data.my_data.second_node.an_attribute.value == "3"
    I think you will find the WebLog below very useful for your requirements.
    /people/juergen.hauser2/blog/2007/09/03/accessing-data-nodes-in-sap-interactive-forms
    -regards,
    harman

  • Viewing and Removing the Time part of the Date field

    Hi,
    I have Date field in a table.
    but in SQL plus when I do
    select date from table
    this gives me only the Date values and not the timestamps in the date.
    I believe Oracle stores 'Date' and 'Time' in fields with Data Type 'Date'.
    How do I print the timestamps also in the SQL query?
    Moreover, if I have to extract the date field, reset the timestamp to 00:00:00, and store back the date field (with 00 time), how do I do that?
    Thanks in advance
    - Manu

    Hi,
    If you want to retry date and time you can:
    SELECT TO_CHAR(DATE,'YYYY/MM/DD HH24:MI:SS') FROM TABLE;
    If you want truncate time when inserting in a table simply use TRUNC function
    INSERT INTO TABLE (DATE) VALUES (TRUNC(YOUR_DATE));
    To extract and insert with time 00:00:00
    INSERT INTO TABLE1 (SELECT TRUNC(DATE) FROM TABLE2);
    I hope this help you.

  • Hw to find the table name of the perticular field is stored in db,usingFM

    Dear all,
    I need to find out the table name of the perticular field is storing in database using FM (note: using Function Module or any standard program , not manually like press F1 -> technicall setting etc.. .) 
    [ Exmple: Field: "MATNR" is stored in table : MARA, so i need the program/FM  to findout MATNR is stoed in MARA table ]
    i need this  FM for update values of  material master ( mm01 ) stored in different warehouse using module pool program.
    it's very urgent , please send me reply asap.
    thanks,
    best regards
    srinivas

    hi Srinivas,
    Please use the following logic:
    types:
        begin of t_find,
           field(40),
        end of t_find.
    data:
        lt_find  type table of t_find,
        ls_find  type          t_find,
        lt_found type table of RSFINDLST.
    ls_find-field = 'MATNR'.
    append ls_find to lt_find.
    CALL FUNCTION 'RS_EU_CROSSREF'
    EXPORTING
       i_find_obj_cls                    = 'DTEL'
       I_SCOPE_OBJ_CLS                    = 'TABL'
       NO_DIALOG                          = 'X'
    TABLES
       I_FINDSTRINGS                      = lt_find
       O_FOUNDS                           = lt_found
    EXCEPTIONS
       NOT_EXECUTED                       = 1
       NOT_FOUND                          = 2
       ILLEGAL_OBJECT                     = 3
       NO_CROSS_FOR_THIS_OBJECT           = 4
       BATCH                              = 5
       BATCHJOB_ERROR                     = 6
       WRONG_TYPE                         = 7
       OBJECT_NOT_EXIST                   = 8
       OTHERS                             = 9
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    The table lt_found has the details for the tables having MATNR as a field; field lt_found-object will have the table names.
    Hope this helps,
    Sajan Joseph.

  • Extracting Year from the date field

    Hi,
    I want to extract year from the date field... I've tried following code but got the error
    SELECT to_char(a.A_EXPIRY_DATE,'yyyy') as EXP_YEAR from Table_A a
    Please advice
    Thanks in advance

    user12863454 wrote:
    SELECT to_char(a.A_EXPIRY_DATE,'yyyy') as EXP_YEAR from Table_A aThis should work and returns a string.
    What error did you get?
    maybe your column name is wrong? Is it really A_somthing? This is possible but slightly unusual.
    also possible
    select extract(Year from sysdate) from dual;
    /* with your table and column */
    SELECT extract(year from a.A_EXPIRY_DATE) as EXP_YEAR from Table_A a;Edited by: Sven W. on Aug 18, 2010 6:41 PM

  • ROW-00014: Cannot update row as the data in the database has changed

    We're having the problem below. We are trying to upgrade a 10g Oracle database via a linked server in SQL Server 2008.
    OLE DB provider "OraOLEDB.Oracle" for linked server "abc" returned message "ROW-00014: Cannot update row as the data in the database has changed".
    Mensagem 7343, Nível 16, Estado 4, Linha 1
    The OLE DB provider "OraOLEDB.Oracle" for linked server "abc" could not UPDATE table "[OraOLEDB.Oracle]".
    Can anyone help?
    Thank you.
    Edited by: user10641061 on 14/10/2011 18:48

    The columns that I want insert in oracle database have this data:
    JULIO DE SANT’ ANNA     KOLISNHG     1968-10-04 00:00:00.000     S     F     10     9     RUA, N° 999 / APT° 99999 RJ     TH     25410003     N°42.018      78550510     125296625     2178942326     2008-11-15 18:58:58.000
    Some of this data may be interfering with this insert?
    thank you
    Edited by: user10641061 on 15/10/2011 15:47
    Edited by: user10641061 on 15/10/2011 15:48

  • The data field format for the sql* loader

    the data field in my data file was surrounded by ",", such as "1","2","3",...
    so in my control file, I coded
    fields terminated by ',' enclosed by '"'
    no error after I execute sqlldr command.
    however, on data has been inserted into table either.
    if I remove "" and ,
    the data field changed to 1 2 3 ...
    and the data has been inserted into my table
    However the first format is what I want. can anyone experienced silmilar situation? please give me a hint.
    your help is highly appreciated
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Renali ():
    say:
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS (
    colname1,
    colname2,
    colname3)
    the data field in my data file was surrounded by ",", such as "1","2","3",...
    so in my control file, I coded
    fields terminated by ',' enclosed by '"'
    no error after I execute sqlldr command.
    however, on data has been inserted into table either.
    if I remove "" and ,
    the data field changed to 1 2 3 ...
    and the data has been inserted into my table
    However the first format is what I want. can anyone experienced silmilar situation? please give me a hint.
    your help is highly appreciated
    <HR></BLOCKQUOTE>
    null

  • How to add the date field in the dso and info cube

    Hi all.
    I am new to bi 7. in the earlier version v hav to button to add the date field. but in the bi 7 der is no option so can any body tell me how to add the date field in the data targets
    Thanks & Regard
    KK

    my prob is solved
    KK

  • How to hide a table row in pdf  using javascript?

    How to hide a table row in pdf  using javascript?

    This is only possible with LiveCycle Designer forms, not PDF forms created
    in Acrobat.

  • When creating a fillable form and saving it as a pdf, the default color of the data fields is a light blue. How do I change the color to something else that will copy better, e.g. a light yellow?

    When creating a fillable form and saving it as a pdf, the default color of the data fields is a light blue. How do I change the color to something else that will copy better, e.g. a light yellow?

    It's probably the fields highlight color of the application, which you can change via Edit - Preferences - Forms.

  • Strange error in online Adobe form for the date field

    Hi Experts,
    I am facing strange problem with online Adobe forms. I could able to save data when i click save button on the form.
    But some times in the form the date field is throwing error message 'MMDDYYYY field is invalid' when i click on save button.
    Is this the problem with versions of Adobe liveCycle designer, Adobe reader or GUI?
    Thanks in advance,
    Ram

    Hi
    Check the format (in the object pallete) of the date field in Adobe liveCycle Designer, If it is not set already set it according to your requirement. then see if it works
    Hope this helps
    Regards
    Amita

  • How to find from which table we got the data

    Hi friends ,
    How can we find from which table we r getting data in the datasource.
    I am getting data from crm system.based on that we created cubes and dsos.
    we have only one datasource.now i need to know from which table we pull the data?
    can any one give the procedure
    Thanks in advance........
    sridath

    Hi,
    Datasource / tables in the source system
    Go to RSA2 (DS Repository) in your source system and display your source system.
    If Extraction Method is 'V' - you are lucky and you see table name where data is taken from.
    If it is F* - function module is used, and you have to go thru its code to see all the tables it uses and logic how data is
    processed.
    Ext. Meth   Short text                                                                               
    V                 Transparent Table or DB View                
    D                  Fixed Domain Value                          
    F1                Function Module (Complete Interface)        
    F2                Function Module (Simple Interface)          
    Q                 Extraction Using ABAP Query                 
    A                 DataSource Append                           
    OR
    Since you have the extract structure and the extractor, you must have some transaction like the Extractor Checker RSA3. If so
    then execute ST05, switch on the trace and execute the extractor checker. Once the extractor checker presents the results
    switch off trace. The clcik on Display trace and you will see all the tables that were hit by the extractor checker to
    retrieve data and present it to you.
    Hope this helps.
    Thanks,
    JituK

  • In which table are stored the data of a set created by GS01?

    Hi All,
    could anyone tell me in which table are stored the data of a set created by GS01?
    Thanks

    Hi,
    It's stored in SETHEADER, SETNODE and SETLEAF tables.
    Regards,
    Eli

Maybe you are looking for