• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

Views Seen via the Web (Notes 4.6)

We have a database view which comprises of a number of columns.  The second column displays the entries from a Country field which can contain multiple country names.  For example, BOSNIA HERZOGOVINA, FORMER YUGOSLAVIA REPUBLIC, UNITED STATES OF AMERICA.  If the country field contained all the previously mentioned names, when viewed thru Lotus Notes the column width is seen as it is in the template (ie only showing BOSNIA HERZ, the rest being hidden).  The 3rd column is a Subject column.

However, when viewed thru a browser, all the countries are displayed thereby hogging all the screen. and making it only possible to view the Subject field by scrolling across.

My question is: How does one control the width of the columns when viewed thru a browser so that they are the same as when viewed thru Notes.
0
Chris_m
Asked:
Chris_m
  • 8
  • 6
1 Solution
 
ghassan99Commented:
Try one of those, whichever suits your data, in the column formula:
"[<TD COLSPAN=n>" + field_name + "</TD>]"
"[<TD ROWSPAN=n>" + field_name + "</TD>]"
"[<TD WIDTH=n>" + field_name + "</TD>]"

If you check the source of any rendered view on the web, you will see that the contents of the data is surrounded with a <TD></TD> tag.  Which is logical for the contents of the cell.

-Gus
0
 
ghassan99Commented:
Also you might try a combination like this:

"[<TD COLSPAN=n ROWSPAN=n>" + field_name + "</TD>]"

-Gus
0
 
Chris_mAuthor Commented:
Thanks for your help, when you mention the column formula, do you mean the box in the designer pane or the formula window in the properties dialog box.  We have formulae in that window already, are we allowed to put the HTML in the designer pane as well?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
ghassan99Commented:
Yes in the designer pane, in the column formula.  There is no place to add code in the column properties dialog box.  Just make sure that the final output will be the field name surrounded with those HTML tags.

-Gus
0
 
Chris_mAuthor Commented:
One last thing, is it not possible to restrict/size the width of the column thru the view?
0
 
Chris_mAuthor Commented:
Disregard my last comment, we are working in the view -- sometimes, I can be dumb!  However, when I try your suggestion of
"[<TD WIDTH=n>" + Country + "</TD>]" it does not modify the <TD> </TD> created by Notes; it creates a new data cell -- and not just one, but one for each country listed in the country field.  
0
 
ghassan99Commented:
You mean some setting in the properties dialog...no its not possible.  But if you want you can just truncate the value, say '@left(field_name,10)' will restrict the value to the first 10 chars.

-Gus
0
 
Chris_mAuthor Commented:
Did you see my comment about the "[<TD WIDTH=n>" + Country + "</TD>]"?  This seems to be an excelent approach to the problem if I could only modify the existing <TD> tag.
0
 
ghassan99Commented:
Country field has multiple values to show?
I have seen another approach...I cant recall, but it involves putting half of the tags in the column name and the rest in the column formula.  Also this way it should work, its working for me.  I think the field you have is multi value, I didnt try that.  I will look it up.

-Gus
0
 
Chris_mAuthor Commented:
Yes, sorry, the field accepts multi values.  But as I said, If I put it in in this way, it is almost as if I am creating another column for each country name in the field (even if only 1 name is there). The original column called Country is empty.
Regards
0
 
ghassan99Commented:
But if its a normal column its working fine, is it not?  Try and play around with the 'Multi value seperator', choose space or comma.
0
 
Chris_mAuthor Commented:
Sorry for the delay; I was out of the office since thursday pm.
When it is left to Notes to convert the view to HTML, we get the following:
<TD NOWRAP> Country1, country2, etc </TD>
when I put "[<TD WIDTH=20]" + country + "[</TD>]" as the column formula, Notes converts as follows:
<TD NOWRAP>
<TD WIDTH=20>Country1</TD>,
<TD WIDTH=20>Country2</TD>
,<TD WIDTH=20>Country3</TD>
</TD>

Notes is now surrounding each country with an opening <TD WIDTH=20> and a closing </TD>and seperating it from the next country with a comma.
This is all put inside the original
 <TD NOWRAP>...</TD>  tags.  This instead of adding the "WIDITH = 20" to the  <TD NOWRAP> tag.  When viewed thru Notes, the HTML code is seen on each side of each country.
0
 
ghassan99Commented:
Yes I noticed your point...I'm sorry, as I can see this, its the way Notes is handling the multi value field.  I think a workaround would be to try and create a hidden field on the document, that takes the value of the country field (which is a list of values) and implodes them (with @implode probably in the field translation formula) to make a text string then display this field on the web view in place of the multi value original country field.

-Gus
0
 
ghassan99Commented:
Did u try it?
My last comment will work a treat by the way.

-Gus
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 8
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now