Results 1 to 8 of 8

Thread: How to not display Empty Fields in search results

  1. #1
    Jason Guest

    How to not display Empty Fields in search results


    I need to know how to keep from displaying empty fields in the form mode after a search. I'm trying it like this.

    <%
    ...

    IF Session(&#34;mode_102&#34 = &#34;form&#34; THEN
    VAR = Session(&#34;ASPdb_102_Field1&#34: IF VAR <> &#34;&#34; THEN response.write(&#34;The field result is &#34; & VAR & &#34;<BR>&#34
    ELSE
    X.ASPdb
    END IF

    ...
    %>

    PLEASE HELP!!

  2. #2
    John Guest

    How to not display Empty Fields in search results (reply)


    Hi Jason,

    What you&#39;re showing below doesn&#39;t seem right. First of all, the session variable you&#39;re checking isn&#39;t even &#34;set&#34; until after a call to ASP-db, so you can&#39;t check it and then decide to call/not call ASP-db.

    What you probably want is the Enterprise Extended MagicCell feature. It can allow you to do one thing if a cell is blank and another if not.

    However, this won&#39;t really allow you to hide entire &#34;columns&#34; if all of them are blank. What are you after? Hiding an entire column, or what? What are the conditions?

    Let us know what you&#39;re trying to do and we can help.

    Thanks,
    John


    ------------
    Jason at 5/14/01 8:39:09 PM


    I need to know how to keep from displaying empty fields in the form mode after a search. I&#39;m trying it like this.

    <%
    ...

    IF Session(&#34;mode_102&#34 = &#34;form&#34; THEN
    VAR = Session(&#34;ASPdb_102_Field1&#34: IF VAR <> &#34;&#34; THEN response.write(&#34;The field result is &#34; & VAR & &#34;<BR>&#34
    ELSE
    X.ASPdb
    END IF

    ...
    %>

    PLEASE HELP!!

  3. #3
    Jason Guest

    How to not display Empty Fields in search results (reply)

    Well, I meant for the &#39;...&#39; to imply all the ASPdb code/properties, etc. You are correct, I do want to hide the entire column (in the form mode) IF the column is empty. I understand about the MagicCell feature, but it doesn&#39;t hide the column heading. Is there a way to do this? Are those the correct session variables? Session(&#34;ASPdb_102_Field1&#34 where &#39;Field1&#39; is a column in the table? Or if we are in the form mode, should there be some way of designating which record we are looking at in the session variable name?

    Thank you,
    Jason


    ------------
    John at 5/14/01 11:58:16 PM


    Hi Jason,

    What you&#39;re showing below doesn&#39;t seem right. First of all, the session variable you&#39;re checking isn&#39;t even &#34;set&#34; until after a call to ASP-db, so you can&#39;t check it and then decide to call/not call ASP-db.

    What you probably want is the Enterprise Extended MagicCell feature. It can allow you to do one thing if a cell is blank and another if not.

    However, this won&#39;t really allow you to hide entire &#34;columns&#34; if all of them are blank. What are you after? Hiding an entire column, or what? What are the conditions?

    Let us know what you&#39;re trying to do and we can help.

    Thanks,
    John


    ------------
    Jason at 5/14/01 8:39:09 PM


    I need to know how to keep from displaying empty fields in the form mode after a search. I&#39;m trying it like this.

    <%
    ...

    IF Session(&#34;mode_102&#34 = &#34;form&#34; THEN
    VAR = Session(&#34;ASPdb_102_Field1&#34: IF VAR <> &#34;&#34; THEN response.write(&#34;The field result is &#34; & VAR & &#34;<BR>&#34
    ELSE
    X.ASPdb
    END IF

    ...
    %>

    PLEASE HELP!!

  4. #4
    Jason Guest

    How to not display Empty Fields in search results (reply)

    Ok, I&#39;m trying to use those session variables, but be aware that that example is for the dual mode. The way I&#39;m using this is in both mode...After the person clicks on the grid row and then it switches to the form mode. Is there something different you can suggest?


    ------------
    Mark at 5/15/01 7:56:53 PM

    Jason,
    One of our on-line examples shows one way to do that.

    Here&#39;s the code:

    Mydb.dbExportFlds = &#34;Name,Age,Salary,NetWorth&#34;
    response.write(&#34;<P>Record Detail<BR>(Null Fields hidden)<P>&#34
    N=Session(&#34;ASPdb_1070_Name&#34: If N <> &#34;&#34; then response.write(&#34;Name = &#34; & N & &#34;<BR>&#34
    A=Session(&#34;ASPdb_1070_Age&#34: If A <> &#34;&#34; then response.write(&#34;Age = &#34; & A & &#34;<BR>&#34
    S=Session(&#34;ASPdb_1070_Salary&#34: If S <> &#34;&#34; then response.write(&#34;Salary = &#34; & S & &#34;<BR>&#34
    W=Session(&#34;ASPdb_1070_NetWorth&#34: If W <> &#34;&#34; then response.write(&#34;NetWorth = &#34; & W & &#34;<BR>&#34



    ------------
    Jason at 5/15/01 6:41:36 PM

    Well, I meant for the &#39;...&#39; to imply all the ASPdb code/properties, etc. You are correct, I do want to hide the entire column (in the form mode) IF the column is empty. I understand about the MagicCell feature, but it doesn&#39;t hide the column heading. Is there a way to do this? Are those the correct session variables? Session(&#34;ASPdb_102_Field1&#34 where &#39;Field1&#39; is a column in the table? Or if we are in the form mode, should there be some way of designating which record we are looking at in the session variable name?

    Thank you,
    Jason


    ------------
    John at 5/14/01 11:58:16 PM


    Hi Jason,

    What you&#39;re showing below doesn&#39;t seem right. First of all, the session variable you&#39;re checking isn&#39;t even &#34;set&#34; until after a call to ASP-db, so you can&#39;t check it and then decide to call/not call ASP-db.

    What you probably want is the Enterprise Extended MagicCell feature. It can allow you to do one thing if a cell is blank and another if not.

    However, this won&#39;t really allow you to hide entire &#34;columns&#34; if all of them are blank. What are you after? Hiding an entire column, or what? What are the conditions?

    Let us know what you&#39;re trying to do and we can help.

    Thanks,
    John


    ------------
    Jason at 5/14/01 8:39:09 PM


    I need to know how to keep from displaying empty fields in the form mode after a search. I&#39;m trying it like this.

    <%
    ...

    IF Session(&#34;mode_102&#34 = &#34;form&#34; THEN
    VAR = Session(&#34;ASPdb_102_Field1&#34: IF VAR <> &#34;&#34; THEN response.write(&#34;The field result is &#34; & VAR & &#34;<BR>&#34
    ELSE
    X.ASPdb
    END IF

    ...
    %>

    PLEASE HELP!!

  5. #5
    Mark Guest

    How to not display Empty Fields in search results (reply)

    Jason,
    The code given will also work in Both Mode. Just be sure you set dbFormDisplayFlds = -1
    Mark.


    ------------
    Jason at 5/22/01 7:53:18 PM

    Ok, I&#39;m trying to use those session variables, but be aware that that example is for the dual mode. The way I&#39;m using this is in both mode...After the person clicks on the grid row and then it switches to the form mode. Is there something different you can suggest?


    ------------
    Mark at 5/15/01 7:56:53 PM

    Jason,
    One of our on-line examples shows one way to do that.

    Here&#39;s the code:

    Mydb.dbExportFlds = &#34;Name,Age,Salary,NetWorth&#34;
    response.write(&#34;<P>Record Detail<BR>(Null Fields hidden)<P>&#34
    N=Session(&#34;ASPdb_1070_Name&#34: If N <> &#34;&#34; then response.write(&#34;Name = &#34; & N & &#34;<BR>&#34
    A=Session(&#34;ASPdb_1070_Age&#34: If A <> &#34;&#34; then response.write(&#34;Age = &#34; & A & &#34;<BR>&#34
    S=Session(&#34;ASPdb_1070_Salary&#34: If S <> &#34;&#34; then response.write(&#34;Salary = &#34; & S & &#34;<BR>&#34
    W=Session(&#34;ASPdb_1070_NetWorth&#34: If W <> &#34;&#34; then response.write(&#34;NetWorth = &#34; & W & &#34;<BR>&#34



    ------------
    Jason at 5/15/01 6:41:36 PM

    Well, I meant for the &#39;...&#39; to imply all the ASPdb code/properties, etc. You are correct, I do want to hide the entire column (in the form mode) IF the column is empty. I understand about the MagicCell feature, but it doesn&#39;t hide the column heading. Is there a way to do this? Are those the correct session variables? Session(&#34;ASPdb_102_Field1&#34 where &#39;Field1&#39; is a column in the table? Or if we are in the form mode, should there be some way of designating which record we are looking at in the session variable name?

    Thank you,
    Jason


    ------------
    John at 5/14/01 11:58:16 PM


    Hi Jason,

    What you&#39;re showing below doesn&#39;t seem right. First of all, the session variable you&#39;re checking isn&#39;t even &#34;set&#34; until after a call to ASP-db, so you can&#39;t check it and then decide to call/not call ASP-db.

    What you probably want is the Enterprise Extended MagicCell feature. It can allow you to do one thing if a cell is blank and another if not.

    However, this won&#39;t really allow you to hide entire &#34;columns&#34; if all of them are blank. What are you after? Hiding an entire column, or what? What are the conditions?

    Let us know what you&#39;re trying to do and we can help.

    Thanks,
    John


    ------------
    Jason at 5/14/01 8:39:09 PM


    I need to know how to keep from displaying empty fields in the form mode after a search. I&#39;m trying it like this.

    <%
    ...

    IF Session(&#34;mode_102&#34 = &#34;form&#34; THEN
    VAR = Session(&#34;ASPdb_102_Field1&#34: IF VAR <> &#34;&#34; THEN response.write(&#34;The field result is &#34; & VAR & &#34;<BR>&#34
    ELSE
    X.ASPdb
    END IF

    ...
    %>

    PLEASE HELP!!

  6. #6
    Jason Guest

    How to not display Empty Fields in search results: GOT IT!

    Here&#39;s how I finally got it to work.

    I didn&#39;t realize it, but I had to include the X.dbExportFlds property. Then I wrote a little IF THEN sequence using the Session(ASPdb_000_FieldName) session variables.

    FHF = &#34;&#34;
    IF Session(ASPdb_000_FieldName1) THEN
    FHF = FHF & &#34;FieldName1,&#34;
    END IF
    ...
    continued for each field name
    ...
    X.dbFormHideFlds = FHF

    Thanks for trying to help!



    ------------
    Mark at 5/23/01 8:37:16 AM

    Jason,
    The code given will also work in Both Mode. Just be sure you set dbFormDisplayFlds = -1
    Mark.


    ------------
    Jason at 5/22/01 7:53:18 PM

    Ok, I&#39;m trying to use those session variables, but be aware that that example is for the dual mode. The way I&#39;m using this is in both mode...After the person clicks on the grid row and then it switches to the form mode. Is there something different you can suggest?


    ------------
    Mark at 5/15/01 7:56:53 PM

    Jason,
    One of our on-line examples shows one way to do that.

    Here&#39;s the code:

    Mydb.dbExportFlds = &#34;Name,Age,Salary,NetWorth&#34;
    response.write(&#34;<P>Record Detail<BR>(Null Fields hidden)<P>&#34
    N=Session(&#34;ASPdb_1070_Name&#34: If N <> &#34;&#34; then response.write(&#34;Name = &#34; & N & &#34;<BR>&#34
    A=Session(&#34;ASPdb_1070_Age&#34: If A <> &#34;&#34; then response.write(&#34;Age = &#34; & A & &#34;<BR>&#34
    S=Session(&#34;ASPdb_1070_Salary&#34: If S <> &#34;&#34; then response.write(&#34;Salary = &#34; & S & &#34;<BR>&#34
    W=Session(&#34;ASPdb_1070_NetWorth&#34: If W <> &#34;&#34; then response.write(&#34;NetWorth = &#34; & W & &#34;<BR>&#34



    ------------
    Jason at 5/15/01 6:41:36 PM

    Well, I meant for the &#39;...&#39; to imply all the ASPdb code/properties, etc. You are correct, I do want to hide the entire column (in the form mode) IF the column is empty. I understand about the MagicCell feature, but it doesn&#39;t hide the column heading. Is there a way to do this? Are those the correct session variables? Session(&#34;ASPdb_102_Field1&#34 where &#39;Field1&#39; is a column in the table? Or if we are in the form mode, should there be some way of designating which record we are looking at in the session variable name?

    Thank you,
    Jason


    ------------
    John at 5/14/01 11:58:16 PM


    Hi Jason,

    What you&#39;re showing below doesn&#39;t seem right. First of all, the session variable you&#39;re checking isn&#39;t even &#34;set&#34; until after a call to ASP-db, so you can&#39;t check it and then decide to call/not call ASP-db.

    What you probably want is the Enterprise Extended MagicCell feature. It can allow you to do one thing if a cell is blank and another if not.

    However, this won&#39;t really allow you to hide entire &#34;columns&#34; if all of them are blank. What are you after? Hiding an entire column, or what? What are the conditions?

    Let us know what you&#39;re trying to do and we can help.

    Thanks,
    John


    ------------
    Jason at 5/14/01 8:39:09 PM


    I need to know how to keep from displaying empty fields in the form mode after a search. I&#39;m trying it like this.

    <%
    ...

    IF Session(&#34;mode_102&#34 = &#34;form&#34; THEN
    VAR = Session(&#34;ASPdb_102_Field1&#34: IF VAR <> &#34;&#34; THEN response.write(&#34;The field result is &#34; & VAR & &#34;<BR>&#34
    ELSE
    X.ASPdb
    END IF

    ...
    %>

    PLEASE HELP!!

  7. #7
    Frank Kwong Guest

    How to not display Empty Fields in search results: GOT IT! (reply)

    you guys are pretty good !!!

    FK


    ------------
    Jason at 5/24/01 7:52:11 PM

    Here&#39;s how I finally got it to work.

    I didn&#39;t realize it, but I had to include the X.dbExportFlds property. Then I wrote a little IF THEN sequence using the Session(ASPdb_000_FieldName) session variables.

    FHF = &#34;&#34;
    IF Session(ASPdb_000_FieldName1) THEN
    FHF = FHF & &#34;FieldName1,&#34;
    END IF
    ...
    continued for each field name
    ...
    X.dbFormHideFlds = FHF

    Thanks for trying to help!



    ------------
    Mark at 5/23/01 8:37:16 AM

    Jason,
    The code given will also work in Both Mode. Just be sure you set dbFormDisplayFlds = -1
    Mark.


    ------------
    Jason at 5/22/01 7:53:18 PM

    Ok, I&#39;m trying to use those session variables, but be aware that that example is for the dual mode. The way I&#39;m using this is in both mode...After the person clicks on the grid row and then it switches to the form mode. Is there something different you can suggest?


    ------------
    Mark at 5/15/01 7:56:53 PM

    Jason,
    One of our on-line examples shows one way to do that.

    Here&#39;s the code:

    Mydb.dbExportFlds = &#34;Name,Age,Salary,NetWorth&#34;
    response.write(&#34;<P>Record Detail<BR>(Null Fields hidden)<P>&#34
    N=Session(&#34;ASPdb_1070_Name&#34: If N <> &#34;&#34; then response.write(&#34;Name = &#34; & N & &#34;<BR>&#34
    A=Session(&#34;ASPdb_1070_Age&#34: If A <> &#34;&#34; then response.write(&#34;Age = &#34; & A & &#34;<BR>&#34
    S=Session(&#34;ASPdb_1070_Salary&#34: If S <> &#34;&#34; then response.write(&#34;Salary = &#34; & S & &#34;<BR>&#34
    W=Session(&#34;ASPdb_1070_NetWorth&#34: If W <> &#34;&#34; then response.write(&#34;NetWorth = &#34; & W & &#34;<BR>&#34



    ------------
    Jason at 5/15/01 6:41:36 PM

    Well, I meant for the &#39;...&#39; to imply all the ASPdb code/properties, etc. You are correct, I do want to hide the entire column (in the form mode) IF the column is empty. I understand about the MagicCell feature, but it doesn&#39;t hide the column heading. Is there a way to do this? Are those the correct session variables? Session(&#34;ASPdb_102_Field1&#34 where &#39;Field1&#39; is a column in the table? Or if we are in the form mode, should there be some way of designating which record we are looking at in the session variable name?

    Thank you,
    Jason


    ------------
    John at 5/14/01 11:58:16 PM


    Hi Jason,

    What you&#39;re showing below doesn&#39;t seem right. First of all, the session variable you&#39;re checking isn&#39;t even &#34;set&#34; until after a call to ASP-db, so you can&#39;t check it and then decide to call/not call ASP-db.

    What you probably want is the Enterprise Extended MagicCell feature. It can allow you to do one thing if a cell is blank and another if not.

    However, this won&#39;t really allow you to hide entire &#34;columns&#34; if all of them are blank. What are you after? Hiding an entire column, or what? What are the conditions?

    Let us know what you&#39;re trying to do and we can help.

    Thanks,
    John


    ------------
    Jason at 5/14/01 8:39:09 PM


    I need to know how to keep from displaying empty fields in the form mode after a search. I&#39;m trying it like this.

    <%
    ...

    IF Session(&#34;mode_102&#34 = &#34;form&#34; THEN
    VAR = Session(&#34;ASPdb_102_Field1&#34: IF VAR <> &#34;&#34; THEN response.write(&#34;The field result is &#34; & VAR & &#34;<BR>&#34
    ELSE
    X.ASPdb
    END IF

    ...
    %>

    PLEASE HELP!!

  8. #8
    Jason Guest

    How to not display Empty Fields in search results: GOT IT! (reply)

    Oops!

    That should have been...

    FHF = &#34;&#34;
    IF Session(ASPdb_000_FieldName1) = &#34;&#34; THEN
    FHF = FHF & &#34;FieldName1,&#34;
    END IF
    ...
    continued for each field name
    ...
    X.dbFormHideFlds = FHF


    ------------
    Jason at 5/24/01 7:52:11 PM

    Here&#39;s how I finally got it to work.

    I didn&#39;t realize it, but I had to include the X.dbExportFlds property. Then I wrote a little IF THEN sequence using the Session(ASPdb_000_FieldName) session variables.

    FHF = &#34;&#34;
    IF Session(ASPdb_000_FieldName1) THEN
    FHF = FHF & &#34;FieldName1,&#34;
    END IF
    ...
    continued for each field name
    ...
    X.dbFormHideFlds = FHF

    Thanks for trying to help!



    ------------
    Mark at 5/23/01 8:37:16 AM

    Jason,
    The code given will also work in Both Mode. Just be sure you set dbFormDisplayFlds = -1
    Mark.


    ------------
    Jason at 5/22/01 7:53:18 PM

    Ok, I&#39;m trying to use those session variables, but be aware that that example is for the dual mode. The way I&#39;m using this is in both mode...After the person clicks on the grid row and then it switches to the form mode. Is there something different you can suggest?


    ------------
    Mark at 5/15/01 7:56:53 PM

    Jason,
    One of our on-line examples shows one way to do that.

    Here&#39;s the code:

    Mydb.dbExportFlds = &#34;Name,Age,Salary,NetWorth&#34;
    response.write(&#34;<P>Record Detail<BR>(Null Fields hidden)<P>&#34
    N=Session(&#34;ASPdb_1070_Name&#34: If N <> &#34;&#34; then response.write(&#34;Name = &#34; & N & &#34;<BR>&#34
    A=Session(&#34;ASPdb_1070_Age&#34: If A <> &#34;&#34; then response.write(&#34;Age = &#34; & A & &#34;<BR>&#34
    S=Session(&#34;ASPdb_1070_Salary&#34: If S <> &#34;&#34; then response.write(&#34;Salary = &#34; & S & &#34;<BR>&#34
    W=Session(&#34;ASPdb_1070_NetWorth&#34: If W <> &#34;&#34; then response.write(&#34;NetWorth = &#34; & W & &#34;<BR>&#34



    ------------
    Jason at 5/15/01 6:41:36 PM

    Well, I meant for the &#39;...&#39; to imply all the ASPdb code/properties, etc. You are correct, I do want to hide the entire column (in the form mode) IF the column is empty. I understand about the MagicCell feature, but it doesn&#39;t hide the column heading. Is there a way to do this? Are those the correct session variables? Session(&#34;ASPdb_102_Field1&#34 where &#39;Field1&#39; is a column in the table? Or if we are in the form mode, should there be some way of designating which record we are looking at in the session variable name?

    Thank you,
    Jason


    ------------
    John at 5/14/01 11:58:16 PM


    Hi Jason,

    What you&#39;re showing below doesn&#39;t seem right. First of all, the session variable you&#39;re checking isn&#39;t even &#34;set&#34; until after a call to ASP-db, so you can&#39;t check it and then decide to call/not call ASP-db.

    What you probably want is the Enterprise Extended MagicCell feature. It can allow you to do one thing if a cell is blank and another if not.

    However, this won&#39;t really allow you to hide entire &#34;columns&#34; if all of them are blank. What are you after? Hiding an entire column, or what? What are the conditions?

    Let us know what you&#39;re trying to do and we can help.

    Thanks,
    John


    ------------
    Jason at 5/14/01 8:39:09 PM


    I need to know how to keep from displaying empty fields in the form mode after a search. I&#39;m trying it like this.

    <%
    ...

    IF Session(&#34;mode_102&#34 = &#34;form&#34; THEN
    VAR = Session(&#34;ASPdb_102_Field1&#34: IF VAR <> &#34;&#34; THEN response.write(&#34;The field result is &#34; & VAR & &#34;<BR>&#34
    ELSE
    X.ASPdb
    END IF

    ...
    %>

    PLEASE HELP!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •