Removing HTML from CCD Nodes - mirth

We've got an inbound CCD. Within some of the content nodes, there are instances of <br/> tags followed by text. Unfortunately, when the XML is processed, it seems as if the <br/> tags are causing the text that follows to be lost completely.
We are trying to remove those tags prior to processing, but are having issues getting that to work. We have tried setting the Attachment property of the channel to remove the tags (i.e., Replace All = <br/>, Replace With = ""), but it had no effect.
Here is a sample node:
<content ID="MEDSIG252044747">
<br/>
81 mg 1 tab, PO, Every Day <--This line is being removed when processed
</content>
How can we get rid of the <br/> tag during pre-processing?

It would be helpful if you shared your code that lead you to believe the text is missing, but you can likely ignore the <br/> elements like this:
var contentNode = msg..content; // or however you'd normally get to this node
// concatenate all child nodes of content with type text
var content = contentNode.text().toString();

Related

Ionic2, ion-range custom content of the range pin

I am using ion-range with pin and steps. I get the current value in the range pin, but I want to add/append some text next to it.
So far in ionic API and docs I did not find a way to modify the content from the range pin, so I am thinking on maybe appending a span via the code, but so far I know to use .append() function from jQuery.
The html of the range pin is:
<div class="range-pin" role="presentation">1</div>
So I want to show it like:
<div class="range-pin" role="presentation">1 item</div>
I know it is a bit late but if anyone comes across this question, I have found the following solution:
HTML
<ion-range id="euroRange" debounce="250" pin="true" min="0" max="50" (ionChange)="formDidUpdate()" [(ngModel)]="price" color="secondary"></ion-range>
See how I added an id called euroRange to my ion-range element.
CSS
#euroRange {
.range-pin:after {
content: " €";
}
}
Inside of the euroRage id I added .range-pin:after which means that whatever I specify should be done directly after the normal content of the pin.
With content I added a space and the € symbol.
Here is the
result.
This was my solution.
Note: I put this inside ionViewDidEnter.
this._elementRef.nativeElement
.querySelector('.range-knob-handle')
.addEventListener('pointermove', function () {
const value = this.getAttribute('aria-valuenow');
this.querySelector('.range-pin').textContent = `${value} hours`;
});
So the main thing here is that the const value is the value selected on the range. After that you can do whatever you want with it and just set the textContent of the range-pin to fix the text.

Nested Filter options in Spotfire

I am learning to create reports using spotfire. Could you please help me to understand the feasibility.
Is it possible to change the filters based on the previous selection(filters has to be altered based on the previous section)
For Example:
I have a following table, with three columns.
Filter1 Filter2 Data
Name Name1 test1
Age Age1 test2
Location Location1 test3
I am planning to have filter options based on the column Filter1 and Filter2.
Is it possible to create a drop down with the values "Filter1" and "Filter2"?
Is it possible to modify the list of filter options, based on the first drop down selection.
For example. if "Filter1" is selected in the drop down. The list of filter options should be "Name","Age", "Location".
if "Filter2" is selected in the drop down. The list of filter options should be "Name1","Age1", "Location1".
Thank you
We can also create a cascading drop down list through the following steps.
Create a “property Control – Drop down list” myDropDownList
Select the “Unique Column Value ” to populate the drop down list (values).
Go to “Insert -> Calculated Column”
Use a simple conditional statement something like If([Value1] = ‘${myDropDownList}’, [Value 2], NULL)
Use the newly created column in the text area filter. This will be updated based on the previous section.
Thanks.
I have a solution utilizing JavaScript to effectively toggle between hidden DIVs. I'm not aware of a way to manipulate the filter object and which column it points to in the Text Area through the API. If someone does know a way I'd love to hear it!
Here is my solution with JS:
Set up your Text Area with a Drop Down for your selection as a column selector (with columns of interest chosen through the "Select Columns..." dialogue), a label displaying that selection (we will hide this, I realize it seems redundant), and 2 filters for your 2 columns.
Right click your text area and click Edit HMTL. Utilizing the HTML below, modify your HTML to match. You will want to have the 1st DIV as your drop down, the SPAN as your label which displays that drop down's property, and then the last 2 DIVS (LETTER and NUMBER in my case) as your two filters. Make sure the DIV id name matches your column name exactly.
<DIV><SpotfireControl id="8dc9d8974bde445cab4c97d38e7908d6" /></DIV>
<SPAN id=docProp style="DISPLAY: none"><SpotfireControl id="1311015997cd476384527d91cb10eb52" /></SPAN>
<DIV id=LETTER style="DISPLAY: none"><SpotfireControl id="760ae9ffd71a4f079b792fb5f70ac8b4" /></DIV>
<DIV id=NUMBER style="DISPLAY: none"><SpotfireControl id="488ef4b1289440d5be24b0dd8cfc3896" /></DIV>
Next we will implement the JS. To do so, click the +JS button in your Edit HTML. The JS itself is below. You'll want to change my inputs of LETTER and NUMBER in the first 2 getElementById references where we set them to display:none.
filter = function(){
input = $("#docProp").text().trim() //Take the text from our hidden label and trim it from any white space.
document.getElementById("LETTER").style.display = 'none'; //Reset DIV
document.getElementById("NUMBER").style.display = 'none'; //Reset DIV
document.getElementById(input).style.display = 'block'; //Set new display
}
//Run this function every 333ms or other length of time desired to update your filters.
setInterval(filter,333)
//Larger numbers mean slower response and better performance vs. faster response and worse performance. Tune as necessary.
Alternatively instead of scanning every X milliseconds (can cause some performance drag), you can make a JS button to run it manually. e.g. $("#divIdForButtonPlacement").button().bind('click',filter)
A few images of my setup for testing are shown below. Let me know if you have any questions regarding this.

How do I remove <p> </p> tags in typo3 RTE text content elements?

Hello I'm getting crazy around a dummy problem: how to remove paragraph tags < p > that RTE (in Typo3 6.1.7) adds oafter saving some text contents. I wish to add some images here to better explain this funny thing but I can't since I've not (yet) enough reputation.
BTW I put the images on an external site:
http://s16.postimg.org/uqbu40fut/rte_ptags_1.jpg
http://s16.postimg.org/7q56roi11/rte_ptags_3.jpg
The first image is a text entered in RTE; the second image (not shown here for the same reputation matter) is the same text shown in the "<>" raw view; the last image is what I see in raw view AFTER saving the content element.
I think that I must do something in the template or in the Typoscritp settings to remove these < p > useless tags... But what ??
Those <p> tags are enabled by default because in most cases you want your Text wrapped in propper HTML markup. However, typing your question into google, gets me to this two lines of Typoscript, wich I just tested on a 6.1.7 and which seem to do the job:
tt_content.stdWrap.dataWrap >
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines >
// Remove Class Of <p class="bodytext">
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.addAttributes.P.class =
// Remove P tag
tt_content.stdWrap.innerWrap >
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines >
//Remove Extra Figure Tag of Image
tt_content.image.20.renderMethod = figure
tt_content.image.20.rendering.figure

xpath query question

below is my xml document and right now my query is: /description/*/text(), I can get all the text except that the text inside the <strong> lunch </strong> which "lunch" doesn't display.
This is probably a simple fix but I just couldn't get it correct.
<description>
<![CDATA[
<p>
Envie is a brand new Bar Lounge that offers a modern-design space opening onto Wyndham Street, where on busy nights the crowd spills out onto the street...
</p>
<p>
If you are in for a <strong>lunch</strong>, the Twangoo voucher will offer you two delicious Lunches – perfect for that lunch meeting, a casual date or just a get together with friends in a relaxed and modern atmosphere.
</p> ]]>
</description>
Try
/description//text()
Right now you are selecting every text only for all the child nodes of description.
If you use //text() instead; you are selecting every text for all nodes that are descendant of the current node (description).
Your query /description/*/text() selects the text node children of the element children of the description element. But the description element has no element children. It would have, except that the CDATA is telling the parser not to treat the <p>...</p> content as markup, but as plain text. I don't know why the XML is wrapping this stuff in CDATA, but it makes it much harder to process it or query it.

Simple paragraph break

I am trying to make a simple paragraph break in my text file (name.js) so that when the iphone pulls the information (name.js) there is not one big run on paragraph. I have looked and looked and cannot find this information can you help me project is due at this time...
try something like this in the javascript:
var pageBreak = document.createElement("/p");
document.getElementsByTagName("tagToInsertBreakAfter")[0].appendChild(pageBreak);
I am away from my machine so i cannot check but try a \n or \r\n
Well it had to be one or the other it'
<br />
i just hacked a widget and tried it. By the way i am assuming you are doing some like the following
// localised strings
var backString_01 = "World Second <br />offers unbeatable exchange rates and exceptional service for foreign exchange and international payments";
then outputting to the document with
document.getElementById('services_headline').innerHTML = backString_01;
With the element in the html something like ....
<div id="services_headline" apple-part="com.apple.Dashcode.part.text" class="apple-text apple-no-children" apple-default-image-visibility="hidden" apple-text-overflow="ellipsis"></div>