There is a TV assigned to a template:
Input Options
Input Type: Check Box
Input Option Values: Category1||Category2||Category3||Category4
Allow Blank: No
Output Options
Output Type: Delimeter
Delimiter: ,
For example:
A getResources call lists the pages with "Category1" checked on the Category1 page - &tvFilters=Category1 used. A getResources call lists the pages with "Category2" checked on the Category2 page - &tvFilters=Category2 used. Etc. Everything is O.K. and as expected.
But if two or more checkboxes are checked on a page, the page disappears from both the Category1 and Category2 pages.
What can be done?
If more than one tag has been entered you need to add a % wildcard:
&tvFilters=`NameOfYourTv==%Category1%`
Related
How do I print a conditional field using PPFA code. When a value is an 'X' then I'd like to print it. However, if the 'X' is not present then I'd like to print an image. Here is my code:
LAYOUT C'mylayout' BODY
POSITION .25 in ABSOLUTE .25 in
FONT TIMES
OVERLAY MYTEMPOVER 8.5 in 11.0 in;
FIELD START 1 LENGTH 60
POSITION 2.0 in 1.6 in;
Where it has FIELD START 1 LENGTH 60 that will print the given text at that location. But based on the value I want to print either the given text or an image. How would I do that?
Here is an answer from the AFP-L list:
I would create two PAGEFORMATS, one with LAYOUT for TEXT and one with LAYOUT for IMAGE. With CONDITION you can jump between the Pageformats (where Copygroup is always 'NULL')
If you work in a z/OS environment, be careful of 'JES Blanc Truncation'.
That means in one sentence:
if there is a X in the data, condition is true
if there is nothing in the data, condition doesn't work and is always wrong (nothing happens)
In this case you must create a Condition which is always true. I call it a Dummy-Condition.
PPFA sample syntax:
CONDITION TEST start 1 length 1
when eq 'X' NULL PAGEFORMAT PRTTXT
when ge x'00' NULL PAGEFORMAT PRTIMAGE;
You must copy this CONDITION into both PAGEFORMATS after LAYOUT command.
Blanc truncation is a difficult problem on z/OS.
In this sample, the PAGEFORMAT named PRTTXT contains all the formatting and printing directives when the condition is true, and the other called PRTIMAGE contains every directive needed to print the image.
HTH
I have columns with different company names. In front of each company name there is a Company_ID. After the Company_ID a specific character = _ divides the ID from the Name. For example i have
111_Mercedes
11B4324_Apple
38A_Google
A1ZH8_Airline
I would like to remove all characters including the specific character.
Result should be
Mercedes
Apple
Google
Airline
Thanks in advance
If this is all in one data item and you need a pattern removed, try this:
As an example, 111_Mercedes 11B4324_Apple 38A_Google
The name starts with _ and ends with a space
Because of this, we can use the replace function to set up the process in two steps
1) Wrap the undesired portion in brackets
Sql would look like this
select
concat('<',replace(
replace('111_Mercedes 11B4324_Apple 38A_Google',' ','<')
,'_','>'))
FROM sysibm.sysdummy1
The result would look like
<111>Mercedes<11B4324>Apple<38A>Google
2) Then remove the content in the brackets
Sql would look like this:
Select trim(REGEXP_REPLACE(
'<111>Mercedes<11B4324>Apple<38A>Google'
, '<(.*?)>',' ',1,0,'c'))
FROM sysibm.sysdummy1
The result would look like this
Mercedes Apple Google
For Cognos try to use the functions in the data item definitions
BracketCompany = concat('<',replace(replace([Company ID],' ','<'),'_','>'))
Then another data item over this, to remove the content within the brackets
FinalCompany = trim(REGEXP_REPLACE([BracketCompany], '<(.*?)>',' ',1,0,'c'))
I wonder whether someone may be able to help me please.
My eventinfo.eventLabel field in my bigquery table contains the following data:
View View Code red for the BDAT group
SELECT
#select all fields excluding those under the hits record
* EXCEPT (hits),
#start array - this rebuilds the hit record
ARRAY(
SELECT
#unnest the hit field, select each field excluding those under the page record
AS STRUCT * EXCEPT (eventInfo ),
(
SELECT
#select all page fields excluding pageTitle
AS STRUCT eventInfo.* EXCEPT (eventLabel),
#remove the query parameter from the pagePath fields
REGEXP_REPLACE(eventinfo.eventLabel, r'View\sView .*', 'View View redacted') AS eventLabel) AS eventinfo
FROM
UNNEST(hits) ) AS hits
FROM
`bigquery.Tested.ga_sessions_20180801`
I'm trying to remove the "Code red" element of the data and replace it with the term "redacted".
Please note that "Code red" is not the only value and the number of characters can increase and decrease. But the "View View" and "for the" are constant throughout my data.
I know that the problem is the REGEXP REPLACE line, and I can manage to put the "redacted" text into the field, but I've not been able to remove the "Code red" text.
Could someone possibly look at this and offer some guidance on how I may be able to change this.
Many thanks and kind regards
Chris
select
[
REGEXP_REPLACE('View View Code red for the BDAT group', r'View View .*? for the', 'View View redacted for the'),
REGEXP_REPLACE('View View Code blue for the BDAT group', r'View View .*? for the', 'View View redacted for the'),
REGEXP_REPLACE('View View red code for the BDAT group', r'View View .*? for the', 'View View redacted for the')
]
I am using jQuery AutoComplete plugin.
I have the data which has special characters as '/-&
When user clicks the text area, the autocomplete drop down shows the data correctly
for example:
don't drink
When user selects the text (don't drink)
In my textarea it load the value as ASCII characters:
don't drink
How can I have the data to load as normal data.
This is my autocomplete code:
var directions ="don't drink/ Once a Day/ Take More/ You'are Good";
directions = directions.split("/");
$("#TextArea").autocomplete(directions, {
matchContains: true,
minChars: 1
});
You can add formatResult to your autocomplete options specifying a function that decodes the result that's output to the text box.
This is my jqgrid - $("#list1")
When it loads, i.e. on the gridComplete event, I need to rename the column header texts.
Original column header texts are in this format - Colomn1, Column2 ...
On gridComplete, I change these header texts like this:
$("#list1_Column" + someNumber).text(someText);
However on doing this, I lose the ability to sort columns. Column headers are no longer clickable and hence I cannot sort the grid after this custom programmatic editing.
Similar thing happens when I try changing the texts in the search dropdown list (search modal - using multipleSearch: true)
When, on gridComplete, I change text values in the select list as per the grid column headers, like this -
var select = $('#grid_wrapper #fbox_list1 .ui-widget-content .sf .fields select');
$('#grid_wrapper #fbox_list1 .ui-widget-content .sf .fields select option').remove();
$.each(data, function (i, item) {
select.append('<option value="Column' + item.id + '">' + item.ColumnName + '</option>')
});
...I lose the ability to perform multiple search, i.e. the + and - buttons in the search modal disappear.
How do I get around these two issues? Retaining ability to sort and perform multiple search after having changed column header and search list text values on load.
Please guide.
The column header <th> element has two child elements: one <span> with the text of the column header and another with the sort icons which are hidden the most time. So if you want to change the text manually you should use another selector
$("#list1_Column" + someNumber+ " > span").text(someText);
If you do so you will change the text on the page, but not change the text in the colNames or in the colModel (if you use label property instead of colNames). The text will be used for example to create Multisearch dialog. You can make changes in the colModel with respect of setColProp method or use getGridParam to get reference to any internal parameter of jqGrid (which are objects like inclusive colNames and colModel) and then make any changes which you need.
The best way in my opinion to solve the described problems is to use setLabel method to change the text in the column header:
$("#list1").jqGrid('setLabel','ColumnName','My new Name');
this will solve both problems.