Tagged with Content_view - Visokio Forums http://forums.visokio.com/discussions/tagged/Content_view/p2/feed.rss Mon, 30 Oct 17 13:28:55 -0400 Tagged with Content_view - Visokio Forums en-CA Content View: Additional command links (2.8+) http://forums.visokio.com/discussion/2001/content-view-additional-command-links-2.8- Thu, 31 Jan 2013 08:19:10 -0500 michael 2001@/discussions You can find them in the next nightly release 2.8-alpha b557.

See also initial forum post:
http://forums.visokio.com/discussion/1997/idea-content-view-expanded-command-link-optionss/p1]]>
Outputs: Export to Excel includes Content View HTML tables? http://forums.visokio.com/discussion/1992/outputs-export-to-excel-includes-content-view-html-tabless Tue, 22 Jan 2013 10:47:48 -0500 enrico68 1992@/discussions
I'd like to ask if it's possible to export a table produced by a Content View script (html like) to an Excel file (including or not including the Content View table formatting).

Thanks]]>
Scripting: Content View - controlling table borders? http://forums.visokio.com/discussion/1912/scripting-content-view-controlling-table-borderss Wed, 21 Nov 2012 09:04:41 -0500 enrico68 1912@/discussions
Thanks]]>
Content View: Background colour? http://forums.visokio.com/discussion/1919/content-view-background-colours Mon, 26 Nov 2012 03:43:39 -0500 Phillipa 1919@/discussions
Thanks, Phillipa]]>
Ideas: Table View - more formatting options? http://forums.visokio.com/discussion/1914/ideas-table-view-more-formatting-optionss Fri, 23 Nov 2012 05:01:40 -0500 enrico68 1914@/discussions
I have to say that most of the reports required are tables of various format; considering this I'm particularly interested in tryint to exploit all the table view features.

I have no problem in getting the required data but unfortunaltely I have to say that it seems to me that at the moment there are many graphical formatting limitations.
I've read other discussions about this needs and I'd like to know it these issues are solved or if they will be considered in future releases.

In particular I think it will be useful to have the possibility to:

- insert a table title including variable parts (such as formulas) or logos;
- format column headers (changing column header color and font, centering headers);
- have table headers based on multiple rows and different disposition (like the colspan and rowspan html command) including also descriptions and not only column data headers;
- apply format to reported values (including different date and numbers representation - es: apply /1,000,000);
- apply format to columns (centering values, representing negative values in red or between brackets, ....);
- ....

At the moment the only way I've found to make a table applying some of these features is to create a Content view and produce the table using scripting, but I would really like to be able to do the same without programming.

Thanks ]]>
Demo: Content View - Using JavaScript arrays (2.8+) http://forums.visokio.com/discussion/1698/demo-content-view-using-javascript-arrays-2.8- Fri, 10 Aug 2012 07:15:58 -0400 CRead 1698@/discussions The result is the internal rate of return (IRR).
The data is a set of consecutive annual payments.
This is the same as the IRR function in Excel, so you can test against that for verification.

Further explanation:
http://office.microsoft.com/en-us/excel-help/irr-HP005209146.aspx
http://en.wikipedia.org/wiki/Internal_rate_of_return

Source code prior to adaptation:
http://code.google.com/p/npoi/source/browse/trunk/main/SS/Formula/Functions/Irr.cs?r=227]]>
Outputs: Exporting Content View to PDF only viewable contents? http://forums.visokio.com/discussion/1804/outputs-exporting-content-view-to-pdf-only-viewable-contentss Tue, 02 Oct 2012 06:32:04 -0400 mohamed 1804@/discussions Content View: Scripting question http://forums.visokio.com/discussion/1782/content-view-scripting-question Mon, 24 Sep 2012 08:04:16 -0400 enrico68 1782@/discussions
I'm trying to create a content with a table included using the following script:

//START OF LOOP
var array = subset_uniquesList("ABIAppartenente");
for (var i in array) {
var val = array[i];
#>

<#/*REPEATED ROW*/#>



<#=val#>
<#/* example of inserting a script expression */#>


<#= formula("SUBSET_SUM('Netto', SUBSET('ABIAppartenente', '" + val+"'))") #>
<#/* example of embedded formulas using the formula() function from within a script*/#>


<#= formula("RECORDCOUNT(SUBSET('ABIAppartenente', '" + val+"'))") #>
<#/* example of embedded formulas using the formula() function from within a script*/#>


{{RECORDCOUNT(SUBSET2('Dataregolamento','ABIAppartenente', '04/09/2012','" + val+"'))}}
<#/* example of embedded formulas using the formula() function from within a script*/#>


<#<br />}
The table is created on a loop on ABIAppartenente code and have different columns:

- first column is the ABIAppartenente code itself;
- second column is a total amount for each ABIAppartenente code;
- third column is the count that contributes for each code;
- fourth column counts record for each ABIAppartenente code for a fixed date.

Everything works fine except for last column that return always 0 (for each ABIAppartenente, also if there are records for each ABIAppartenente code and the indicated date Dataregolamento).

So I'd like to know if anyone have an idea about the problem in using the SUBSET2 as indicated - Thanks
]]>
Content View: Native Browser JavaScript API (2.8+) http://forums.visokio.com/discussion/1731/content-view-native-browser-javascript-api-2.8- Fri, 24 Aug 2012 13:04:55 -0400 steve 1731@/discussions
This allows advanced users with JavaScript development skills to effectively build a custom view in Javascript which runs in your system browser, embedded inside the Omniscope Content View, with the page source editable in the Content View as usual.

This is very much work in progress, and subject to change following feedback before we release 2.8 in public beta. Please experiment and post below, but don't build any live reports that depend upon the new behaviour.

But can't I already use Javascript in the Content View?


The Content View already supports Javascript pre-processing. In your page source, you have special <# #> tags indicating the start and end of script fragments. Omniscope then, behind the scenes, executes the Javascript in a browser-less environment to produce the final page text.

This is directly equivalent to the way a PHP/JSP/ASP/etc. web server might "execute" a server-side page to produce the HTML document that is sent to the client. We chose to use Javascript on the "server" side, but note that there is no HTML DOM or browser Window object, for example; this is pure "headless" Javascript.

In this case, the "server" is the Omniscope Content View back-end, in-memory on your desktop, and the "client" is the page renderer, either Java within Omniscope, or a separate native browser process embedded in the Omniscope window.

New source editing enhancements


When editing in "source mode" in the Content View, we now have full syntax highlighting of your page source. This makes scripting and HTML coding much, much easier.

Note that if you're using script pre-processing, advanced formulae, or the native browser, you will only be allowed to use source mode, rather than "design mode" for editing your page.

New menu items in the view's Tools menu:


  • "Use native browser"

    This affects how the HTML page content is rendered, after it has been evaluated (e.g. applying any formula insertion or script pre-processing).

    This is deselected by default, matching 2.7 behaviour, meaning the page is displayed using Omniscope's built-in rich text display (via Java, based on HTML 3.2, without any support for in-page Javascript).

    When selected, the page is displayed by embedding the system web browser (typically IE on Windows), allowing "client-side" scripts to be executed in the browser's Javascript engine, with full access to the HTML DOM, etc. This allows you to build Javascript interactivity and do other native browser behaviours such as embed media.

  • "View in external browser"

    Click this to open the same page in an external browser. This allows you to debug your page in a full separate browser; we recommend Google Chrome for its developer tools out-of-the-box. The embedded browser, if IE, has very limited support for debugging.

    Note that Javascript native dialogs (alert/confirm/prompt) are disabled in the embedded browser, because it can often lead to a complete freeze of the application. You should use alternative Javascript frameworks instead.

  • "Refresh on change"

    By default, the page content is rebuild and the browser refreshed when cell edits or filtering occur. Untick this option to disable. You will need to code in a different means of triggering updates to any data you may have loaded via API / AJAX calls.

    Even if ticked, viewing in an external browser will never refresh automatically on change; you will need to manually reload the external browser.



AJAX requests


You can choose to use this native browser option to add some animations or general pizzazz to your Content Views, or more extensively by using the API to request and process data.

We currently provide two APIs. At a low level, an HTTP service is provided should you wish to roll your own AJAX calls and perhaps use different or incompatible JS libraries to those used by the high-level API.

The high-level API is enabled by inserting a pre-processing snippet into your page source in the HTML HEAD tag, and provides Javascript objects and methods to 'call' the enclosing Omniscope Content View.

Low-level API

The page itself is served up by "page.html" within an auto-generated unique URL, which changes each time the view is opened. Use "View in external browser" to see the URL. But you should not need to know this, since the other HTTP services are available in a relative URL to this page. For example, from within "page.html", you can use AJAX and hit the "meta.json" URL (without any further URL qualifiers).

All requests return HTTP status code 200 if successful.

  • page.html

    Returns the page content as text/html after applying pre-processing and evaluating formulas.

    No request parameters.

  • eval.json

    Evaluates a JS expression on the back-end, with access to formula functions.

    Accepts a POST request with text/plain upload body (NOT regular key/value form data), containing a Javascript expression to evaluate against the Content View's dataset as per "script pre-processing". This can be used to query arbitrary formula functions such as subset_max("fieldname"), for example.

    Returns JSON { "result": value } where value is the result of the expression; can be a complex object or array.

  • meta.json

    Retrieves metadata about the view's data.

    No request parameters.

    Returns JSON { "fieldCount" : 13, "recordCount": 1052, "fieldNames": ["field1","field2",...], "fieldTypes": ["text","text","date","integer","decimal",...] }

  • cells.json

    Retrieves one or more cell values.

    Accepts a POST request with the following form key/value pairs:
    "fields": a JSON array of field names; if omitted, all fields are retrieved
    "firstRow": The first row to retrieve, 0-indexed, must be in-bounds; if omitted, zero is used
    "numberOfRows": The number of rows to retrieve; if omitted, all remaining rows are retrieved; automatically capped by the last row in the dataset

    Returns JSON { "result": [ [cell00, cell10, cell20], [cell01, cell11, cell21], [cell20, cell21, cell22] ] }
    (where the 2-dimensional array's dimensions reflect the filtered data results, doesn't contain a row for field names, and is indexed [column][row]).

  • edit.json

    Writes back one or more cell edits to the data table.

    Accepts a POST request with the same key-value pairs as "cells.json", plus:
    "data": a JSON two-dimensional array, in the same format as returned by "cells.json" under the "result" property.

    Returns the empty JSON {} to indicate success.

    This will only work in licensed editions where editing cell data is permissioned - i.e. not in the free Viewer. It will propagate a change to all views, and you will immediately see the result. You will need to untick "Refresh on change" if you want to avoid the same Content View (which originated the call) from reloading your page.


]]>
Content View: Subset functions? http://forums.visokio.com/discussion/1732/content-view-subset-functionss Mon, 27 Aug 2012 10:51:36 -0400 Cynthia_Recchi 1732@/discussions
I have a file, with the following fields: Brand, Media, Period (MMM-yy) and Investment. What I am trying to do is to generate an formula (in a Content block) so It does the following: total amount of investment in Open TV in brand of the selected period ABOVE total amount of investment in Open TV of the selected period.

I want it to change according to what I select in the right sidebar. I am trying to create the formula in the Content View, but it keeps on colouring my parameters in red, as if they are wrong.

How do you suggest I should do this?

Thanks in advance for your help.]]>
Custom time periods: change versus previous year http://forums.visokio.com/discussion/1667/custom-time-periods-change-versus-previous-year Mon, 23 Jul 2012 12:07:51 -0400 Maty 1667@/discussions Content View: Custom scripting (2.7+) http://forums.visokio.com/discussion/1072/content-view-custom-scripting-2.7- Fri, 28 Oct 2011 12:43:12 -0400 steve 1072@/discussions
For example, this allows you to repeat a section of your document for different subsets of the data.

Scroll down for an example IOK file.

Requires 2.7 b96 or later. You must use "View Source" mode (the "<>" button in the Content View toolbar).

Existing syntax for dynamic content - {{ }}

The existing dynamic content syntax is as follows. You might not use this, but if you have inserted dynamic content using the "f" button in the Content View, this is what happens in "view source" mode:

<p><b>Total:</b> {{ SUBSET_SUM("Coupon") }}</p>

This example inserts the dynamic result of the sum of the "Coupon" field according to whatever data results after applying your filters.

New syntax for scripting - <# #> and <#= #>

<#
  if (x==5) {
    y = 3;
  } else {
    y = 2;
  }
  out.println("Write some text into the document, programmatically");
  var array = subset_uniquesList("Category");
  for (var i in array) {
    
#>
    <b>Some text and HTML with <#=array[i]#> (inserted values)</b>
    <#
  }
#>

This example demonstrates some JavaScript then uses a loop over unique values (after applying filters) in a field to repeat a section containing both static content and inserted script expressions.

See the attached file for a larger example including comments.

Functions available in script blocks

formula("IF(RAND<0.5, true, false)")
Dynamically evaluates an arbitrary formula using normal Excel-like formula syntax (not script)

recordCount() or recordCount(subset)
See http://www.visokio.com/kb/functions-guide#RECORDCOUNT

subset("Field name", "Field value") or subset("Field name", "Field value", "Operator")
See http://www.visokio.com/kb/functions-guide#SUBSET

subset_sum("Field name") or subset_sum("Field name", subset)
See http://www.visokio.com/kb/functions-guide#SUBSET_SUM
Note that all SUBSET_? functions are supported in JavaScript. The SUBSET_UNIQUESLIST function is slightly different in that subset_uniquesList() returns a JavaScript array rather than a single String containing a comma-separated list.

textvalue(value) or textvalue(value, pattern)
See http://www.visokio.com/kb/functions-guide#TEXTVALUE

More to come.

Example IOK file

Open the attached file in 2.7 b96 or later. This shows a table whose rows come and go as you filter. Try filtering by the Category field. Also try dragging the date sliders to see the numbers update and the rows disappear.

Expand the toolbars (or choose Toolbars > View toolbars), then click the "<>" icon to view source. The source is well-commented and shows different ways of working with scripting.
]]>
Content View: Changing the display - 'No Value' http://forums.visokio.com/discussion/1601/content-view-changing-the-display-no-value Fri, 15 Jun 2012 06:25:07 -0400 SteveW 1601@/discussions
I am trying to create a formula in a Content View with the below formula:
SUBSET_SUM([Position], INTERSECTION(SUBSET([Keyword rank],1), SUBSET([Week Rank],1)))

This returns the value as expected, except for any instances where none of the instances occur it shows "(no value)" in my table.

Is there a way to set the default (no value) to a blank space? I am sure that it is a simple formula but I can't seem to get it to work.

Thanks
Steve]]>
Content View: Annotation? http://forums.visokio.com/discussion/1260/content-view-annotations Fri, 27 Jan 2012 14:15:58 -0500 bgrovens 1260@/discussions
image

Thanks, Brian]]>
Idea: Content View-Spreadsheet cells? http://forums.visokio.com/discussion/1226/idea-content-view-spreadsheet-cellss Thu, 19 Jan 2012 05:22:40 -0500 rajeshbalu29 1226@/discussions ]]> Content View: Changing background image for an HTML table? http://forums.visokio.com/discussion/1212/content-view-changing-background-image-for-an-html-tables Fri, 13 Jan 2012 10:53:09 -0500 swallace 1212@/discussions
Many thanks, Scott.]]>
Content View: Indicator arrows http://forums.visokio.com/discussion/1203/content-view-indicator-arrows Thu, 12 Jan 2012 05:55:45 -0500 swallace 1203@/discussions
In the short-term I've tried to extract the red and green arrows from Omniscope so that I can rotate them and use them in a custom rule, however this doesn't seem possible. Please could someone send the image files to me?

Many thanks Scott. ]]>
Textbox feature in the visualisations http://forums.visokio.com/discussion/895/textbox-feature-in-the-visualisations Wed, 27 Jul 2011 03:52:42 -0400 shamong 895@/discussions
Is there any way where a textbox can be inputted into the charts itself to record any observations and comments?

Thanks!]]>
Format in dynamic content http://forums.visokio.com/discussion/649/format-in-dynamic-content Tue, 15 Feb 2011 10:55:49 -0500 jforero 649@/discussions Do you have any plan to include this in the 2.6 version?]]> Use of functions on the Content View http://forums.visokio.com/discussion/632/use-of-functions-on-the-content-view Thu, 27 Jan 2011 09:48:26 -0500 jforero 632@/discussions SUBSET_SINGLETON([Value],SUBSET3([Metric],[Month],[Year],"Visitors",[Month],[Year])) 
But I am receiving this message:
"Fields are not accessible in embedded formulas"
Please let know us if it have any constraints to use this type of formulas on the content view?]]>
Import: Embedding a PDF as image? http://forums.visokio.com/discussion/467/import-embedding-a-pdf-as-images Fri, 29 Oct 2010 11:48:14 -0400 xuanzheng 467@/discussions Xuan]]> How can I change a picture in a content view to correspond with a value in a filter? http://forums.visokio.com/discussion/624/how-can-i-change-a-picture-in-a-content-view-to-correspond-with-a-value-in-a-filters Wed, 26 Jan 2011 10:45:27 -0500 Louise_Peers 624@/discussions
Please help!

Thanks]]>
Idea: Content view-rotate view 90 degrees? http://forums.visokio.com/discussion/1561/idea-content-view-rotate-view-90-degreess Tue, 22 May 2012 08:42:02 -0400 tamsinw 1561@/discussions I was wondering if it is possible to rotate a Content view by 90 degrees so the text like in the axis title of a chart?
Many thanks, Tam]]>