Replace text with number
Hi
i have 2 columns from flat file
0amount number
10000
"Intangibles" 2000
20000
'sales' 4000
my output is required like
incase if i am getting text ( this text is not constant its coming like any thing shownw above example) i need replace number key figure values in 0amount fileds.
how can i reach with this in field routine
data v_text type char
if source_fields_0amount not equall number
result 0 number ( kf)
like what is code i need to use
Hi,
One thing's to be clarified :
If you need sometimes number & sometimes text in a particular target field, then it has to be a char field and you cant do any mathematical operation on that later.
--Akashdeep
Similar Messages
-
Applescript replace text with clipboard
Sorry if this has been asked before, I have been searching for hours and cannot find anything.
what I would like to do is copy text from a safari webpage , swap to the textedit program and replace text with the copied contents.
for eg.
from safari I have copied the user link, I then want it to swap over to textedit, find the keyword "userlink" and replace it with the copied content from safari
userlink
email
number
HHopefully I have explained it correctly, and thanks in advance for any helpHi,
Like this:
set x to the clipboard as «class RTF »
tell application "TextEdit"
set first word of front document whose it = "userlink" to x
end tell
If you want plain text, remove as
as «class RTF » -
Use Powershell to replace text with image in Word document
I have a powershell script that uses a Word document as a template to create signatures that I am pushing out to my organization.
The document is populated with text formatted the way I want the signature to look, that I then do a FindText and ReplaceText on. This works fine for replacing text with text, but I can't figure out how to properly replace some of the holder text with
an image and a link. I found a few posts about adding images to word documents, but none that seem to work properly in this scenario.
Any insight would be greatly appreciated, thanks!Dear BOFH,
You are correct that method I outlined is not for inserting an image into a signature block (which would be in Outlook, not Word). The links you post do certainly deal with outlook signatures, well done... Except that the question was about how to
use a Powershell script to replace text in a Word document with an image. Sure it was framed in the context of creating signatures, but the poster expressed that they already had a method of generating and replacing text, and just needed to know, as
I did, how to do the thing they actually asked.
Please BOFH... Please forgive my audacity in hoping to find a reference (any reference) to how to replace Word text with images via Powershell in a thread titled "Use Powershell to replace text with image in Word document".
This is certainly a scripting question, and even something as simple as "You will need to call the .NET methods for the Word find/replace functionality. Please ask in the Word forums for the correct method to use.
If you need help on calling .NET methods look HTTP ://here"support you offered combined with the contempt you offer in response to my actual substantive help to the actual question asked.
BOFH, you are not better than us, just more arrogant.
Can you please start your own question as this one has been closed. Please see scripting guidelines.
We cannot guarantee you satisfaction as this is a user supported forum. The is no SLA for community support. Perhaps if you posted a better worded question as a new topic someone might be able to help you resolve your issue.
The topic you are posting on is closed and answered.
¯\_(ツ)_/¯ -
Lion replaces text with 'block A' characters in safari
about 1/4 of the sites i vist now (including my own--in safari) have a 'block A' character where there is html text.
does anyone know how to fix this?
thanks.There are two articles on MacFixit about this.
Fonts are implicated in both.
http://reviews.cnet.com/8301-13727_7-20087102-263/webkit-sandboxing-conflict-cau ses-safari-block-a-font-problem/
http://reviews.cnet.com/8301-13727_7-20085570-263/safari-in-os-x-lion-replacing- text-with-block-a-characters/
Clearing caches and booting to Safe Mode has helped the majority of people experiencing this problem; however, for a few people the problem returns after a while, indicating that either Safari itself or the system's font configuration may be actively corrupting the font cache.
.... (example)
- If this happens, then unfortunately the approach would be to systematically disable system fonts using Font Book until the problem goes away, and then remove the specific fonts that are contributing to the problem. -
Search .docx and replace text with image
I've got a directory containing a series of images. The images will always be the same name and I need to insert them into placeholders in a Word document which will be a template. I thought of using the image names as placeholders, opening the document
and searching for the image name, replacing it by inserting the image, and doing so for each image in the directory.
$file is the name of the image in the directory and it loops through them okay.
foreach($file in Get-ChildItem $savepath -Filter *.jpg)
# search word doc and replace selected text with image ($file)
Also inserting the image seems simple enough from a TechNet article I found, but I've got no idea how to open the Word document and do a search and replace. I found a few articles related to the subject but I couldn't get them to work when I tried to adapt
them.
Any help is appreciated. Thanks in advance.This 'might' be possible, but I'm having a hard time finding good references to the com object capabilities for inserting an image into a word document. Creating new, converting format, that sort of thing is straightforward.
I'd do a search on "powershell word comobject" and variations of insert image update edit, etc. Or maybe someone else with more experience/knowledge has a magic bullet for you. Once you get some info on doing it with powershell, expand
your search by omitting the powershell keyword, there's gotta be some solid documentation for the comobject somwhere, but it will probably be a bit complex.
You can also:
$word = new-object -comobject word.application
$doc = $word.documents.add("<path to word document>"
and get-member to your heart's content, but finding references and/or documentation might be easier.
Good luck!
Edit: This could help, but really doesn't give much insight into placement of the image, only helps getting the image into the doc: http://gallery.technet.microsoft.com/office/44ffc6c8-131f-42f1-b24b-ff92230b2e0a
If you do find something useful, post it here, I'm sure others could benefit!
SubEdit: Should have thought of this already...
http://msdn.microsoft.com/en-us/library/ff837519(v=office.14).aspx -
Substitute Function in Excel: Replace text with instance number in BO
Hi,
I have a column where data is merged from three other columns each text separated by "-". Ex: Services - Phoneline - New Customer.
What I wanted to do is to just get the last text which is "New Customer" separated. I used "Length(<columnValue>)-Length(Replace(<columnValue),"-",""))" to get the number of instances of "-" in the text as it varies from 1 to 3.
I use to do it in excel using substitute function where I have the facillity to use the character instance number. I don't know how to do this in Business objects.
Please help...
ThanksDDann wrote:
=SUMIF('New Req to Capability Mapping'!$D$2:$D$148,A2,'New Req to Capability Mapping'!$I$2:$I$148)
Col A is a list of the capabilities and the formulas are in COL B of this sheet. [....] The problem that I am experiencing is that for some of the capabilities I am see correct count totals for some while others are not for instance, "Account
Management" shows correct while "Security Awareness Program" is not. I have copied the text for each of the capabilities from the main sheet into Col A to reduce keystroke errors. I have also copied those strings into some of the problematic
formulas instead of using the cell address to see if the results change.
Good troubleshooting techniques. Unless someone gets lucky with a wild guess, I suspect we cannot help without having the workbook to see the situation for ourselves.
You can upload an example Excel file (devoid of any private data) that demonstrates the problem to a file-sharing website.
Then post the "shared", "public" or "view-only" link (aka URL; http://...) in a response here.
The following is a list of some free file-sharing websites; or use your own.
Box.Net: http://www.box.net/files
Windows Live Skydrive: http://skydrive.live.com
MediaFire: http://www.mediafire.com
FileFactory: http://www.filefactory.com
FileSavr: http://www.filesavr.com
RapidShare: http://www.rapidshare.com
I suspect that the problem has to do with either a mismatch in spacing or the presence of non-breaking spaces (HTML  ) or other non-printing characters, notwithstanding your efforts to eliminate that possibility with your copy-and-paste experiments. -
Replace textmarker with number (1, 2, 3 ...)
I wonder if there's a way to work with variables in Indesign.
I've got a indesign file that contains multiple occurences of "##" (as placeholder-text).
I want to replace the first occurence with the number 1, the second with the number 2 and so on...
Is there a way this can be done with scripting in Indesign.
(The way i do this now is by exporting the file to xtag-text and then use a php-script to replace the markers in the tagged file)Hi,
Try this as a .jsx script to run from ESTK or ID Script Panel:
#target indesign
var
placeholder = "##",
mFound, len, start = 1;
if (app.selection[0] && (app.selection[0] instanceof "Text Frame" || app.selection[0].hasOwnProperty ("baseline") ) )
var mStory = app.selection[0].parentStory;
else { alert("Select target textFrame or some part of target text\rand try again!"); exit();}
app.findTextPreferences = null;
app.findTextPreferences.findWhat = placeholder;
mFound = mStory.findText();
len = mFound.length;
while (len-->0)
mFound[len].contents = (len + start).toString();
- placeholder is a string to find; start is a value of first number to replace.
- some part of text or textFrame should be selected.
Jarek -
Replace text with formula in calculate columns
How can I replace ";" in a text like this with " AND " ?
example text: "abc;cde;efg;ijk"
the result should be like this: "abc AND cde AND efg AND ijk"Hi,
According to your description, my understanding is that you want to replace “;” with “AND” in calculated column.
As you are not using English as the default language, you should use the localized version of function names and ";" instead of commas.
To replace all the “;” with “AND”, we need to use the formula as below(for English site):
=REPLACE((REPLACE((REPLACE([mycolumn],SEARCH(";",[mycolumn]),"1"," AND ")),SEARCH(";",(REPLACE([mycolumn],SEARCH(";",[mycolumn]),"1"," AND "))),"1",
" AND ")),SEARCH(";",(REPLACE((REPLACE([mycolumn],SEARCH(";",[mycolumn]),"1"," AND ")),SEARCH(";",(REPLACE([mycolumn],SEARCH(";",[mycolumn]),"1"," And "))),"1",
" AND "))),"1"," AND ")
More references:
http://sharepoint.stackexchange.com/questions/59195/modifying-a-calculated-column-gives-different-errors
http://social.technet.microsoft.com/Forums/sharepoint/en-US/5487889f-5fc8-48e1-8ea2-28f8c9c8ad0c/calculated-field-error?forum=sharepointgenerallegacy
http://office.microsoft.com/en-in/windows-sharepoint-services-help/replace-function-HA001161055.aspx
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
Replace text with image using Applescript in InDesign CS5
Hi to everyone, i'm looking for some suggestions to resolve my problem.
I've to replace some strings with jpeg images stored on my pc
Here is the code to replace two strings with the new ones.
tell application "Adobe InDesign CS5"
set myDocument to active document
set myPage to page 1 of myDocument
set stringsToReplace to {"111", "222"}
repeat with iterator from 1 to (count stringsToReplace)
set find text preferences to nothing
set change text preferences to nothing
set myFoundItems to nothing
set element to item iterator of stringsToReplace
if element is "111" then
set find what of find text preferences to "111"
set change to of change text preferences to "ONE"
set myFoundItems to change text
display dialog ("Found : " & (count myFoundItems) & " occurences of " & element)
else if element is "222" then
set find what of find text preferences to "222"
set change to of change text preferences to "TWO"
set myFoundItems to change text
display dialog ("Found : " & (count myFoundItems) & " occurences of " & element)
end if
end repeat
set find text preferences to nothing
set change text preferences to nothing
end tell
Can you hel me?
Thanks in advance.Hello, I have a couple of questions for you… How come you have strings in text frames… Would you not be better off using labels for this…? ( thats how I would do this ). Off the top of my head I think you will need to remove any text content from the frame to be able to change it's content type… only then will you be able to place a graphic… How are you associating your strings with the required image files… Do you have this in some extenal file Excel or FMP.
-
How to replace name with number ID
Example:
Table1
T1ID Name1
1 John Smith
2 Kathy Smith
Table2
T2ID Name2
100 John Smith
101 Kathy Smith
102 John Smith
103 Kathy Smith
I want to replace all names in column called Name2 in Table 2, with matching T1ID from Table 1. There are many name repetitions in Table 2.If Name2 is VARCHAR and T1id is number then it would be better to add a new column with a consistent data type;
Sample data;
create table table1 as (
select 1 t1id, 'John Smith' name1 from dual union all
select 2, 'Kathy Smith'from dual);
Table created
alter table table1 add constraint table1_pk primary key (t1id);
Table altered
create table table2 as (
select 100 t2id, 'John Smith' name2 from dual union all
select 101, 'Kathy Smith' from dual union all
select 102, 'John Smith' from dual union all
select 103, 'Kathy Smith' from dual);
Table createdAdd the new column;
alter table table2
add name_id references table1(t1id);
Table alteredUpdate the new column;
merge into table2 t2
using (select t1id, name1
from table1) t1
on (t2.name2 = t1.name1)
when matched then
update
set t2.name_id = t1.t1id;
DoneDrop the retired column;
alter table table2 drop column name2;
Table altered
select * from table2;
T2ID NAME_ID
100 1
101 2
102 1
103 2 -
Regular expressions for replacing text with sms language text
Hi, I'm trying to write a function which converts normal, correctly spelled text into the shorter sms language format but struggling to come up with the regular expressions i need to do so, can anyone help?
1: remove surplus white space at the beginning of a sentence and at the end of a sentence.
e.g. " hello." --> "hello." OR "hello ." --> "hello."
2: remove preceeding and/or proceeding space if there's a word then a number possibly followed by another word
e.g. "come 2 me" --> "come2me" OR "dnt 4get" --> "dnt4get"
3: remove "aeiou" if word starts and ends with "!aeiou"
e.g. "text" --> "txt"You can make the whitespace on either side optional: text = text.replaceAll("\\s*(\\d)\\s*", "$1");1. Use String's trim() method.
3. This one has to be done in two steps: import java.util.regex.*;
public class Test
public static void main(String... args) throws Exception
String text = "The quick brown fox jumps over the lazy dog.";
System.out.println(devowelize(text));
public static String devowelize(String str)
Pattern p = Pattern.compile(
"[a-z&&[^aeiou]]++(?:[aeiou]++[a-z&&[^aeiou]]++)+",
Pattern.CASE_INSENSITIVE);
Matcher m = p.matcher(str);
StringBuffer sb = new StringBuffer();
while (m.find())
m.appendReplacement(sb, m.group().replaceAll("[aeiou]+", ""));
m.appendTail(sb);
return sb.toString();
} -
How to replace text with vector image in 3d space
Hello,
I want to replace the text in this template http://vimeo.com/15026094 with a vector image logo.
Any ideas would be helpful. Btw, I have CS4.
Thanks,
tdI finally took a look at your Vimeo example and I'd guess that the animation of the text was created with Text Animators and range selectors. As Mylenium said, and as I said
Reveal all of the animated properties that you want to transfer to your new layer. Usually pressing the U key will suffice.
Note: Text animations and shape animators will be ignored unless the new layer is a text or shape layer.
You need read up on Text Animators so you can understand them.
Type a question in the search field at the top right corner of After Effects.
And you'll find all of these resources. (providing you have the Adobe Help preferences set to search the web)
Animation presets will save all animated properties applied to a layer, but they will only apply the keyframes to properties that exist on the layer. Text Animators only exist in text layers so you'll have to animate your logo by hand or grab yourself a font creation tool and recreate your logo as a font. -
Hi,
I'm using a script found here, to replace @equ001.pdf@ with the corresponding image, same for eq002 etc.
This script works more or less ok for me.
Sometimes, it removes some image names without replacing the image, sometimes it was leaving some "@" here and there.
Sometimes, it's giving me an error on the "place image" code, saying it cannot find the image, giving it's path ending with the grep expression $2 and doesn't work at all.
Sometimes it does part of the job, stops, gives the same error as above, and continues to work when I click ok.
Today, it didn't worked on a document. I copied the text to work on into a new InDesign document an there, it worked (but in two times).
Is there any other way of doing this ?
if(app.documents.length != 0){
var myFolder = Folder.selectDialog ('Choose a folder with images');
if(myFolder != null){
// reset the Find/Change dialog
app.findGrepPreferences = app.changeGrepPreferences = null;
// formulate a grep search string
app.findGrepPreferences.findWhat = '@.+?@';
// find all occurrence, last one first
f = app.activeDocument.findGrep (true);
for (i = 0; i < f.length; i++){
// construct file name
name = f[i].contents.replace (/@/g, '');
// place the image
var placedObjects = f[i].insertionPoints[0].place (File (myFolder.fsName + '/' + name));
// delete all @??@ codes
app.activeDocument.changeGrep();
else{
alert('Please open a document and try again.');You should process the found instances back to front:
for (i = f.length-1; i >= 0; i--)
Peter -
Replace text with data while viewing
Hello,
I have data in table like below
id name
1 tanveer
2 ali khan
3 tasir
I want to write a query that display result on my abbreviated vales e.g. tanveer =tan,ali khan=al.
so my query result will be
id name
1 tan
2 al
regards,
tanveerUse "SUBSTR(name, 1,3)" to display the first 3 characters. However, if your "rule" for abbreviations is more complex (for example "ali khan" becomes "al" instead of "ali" ???) then you'd have to use either of these methods :
1. Store the abbreviated values in another column in the table
2. Use a lookup table to "map" names to abbreviations
3. Write a PLSQL function with the "rules" built into it and taking the current name as an input, returning an abbreviated name
4. Use a simple DECODE function (which can be used only when you have a very small number of distinct "name" values to hardcode into the function call).
Hemant K Chitale
http://hemantoracledba.blogspot.com -
I need to replace every instance of the word Forward! with Forward! in italics. I have not found a way to do that...Any Ideas?
Thanks
JackL
Captivate 7 - Windows 7I am using CP 7 and Word 2010 and some really strange fonts including Neurpol, etc. Anyway it worked perfectly for five of my six modules (projects). For one however, the import affected no change so I cleared my preferences (a trick Iearned from youi), and the import worked perfectly.
Altogether I had approximately 800 replacements. Doing it manually would have been a nightmare! Especially given that Captivate does not highlight the word when found (at least in my version-instance of CP 7).
Thanks for replying!
JackL
Maybe you are looking for
-
I have an iTouch. I do not remember exactly what happened, but I now have a folder labeled "Books" that contains my Kindle app. Previously, I simply had the Kindle app on the home screen. How do I remove the Books folder and return to the previous se
-
Hi Every One, 1) How to debug (debuging steps )in a report in boxir2 webi based report.can any body help me out . 2)How we do the performance and tuning in the report level. 3)Aggregate awareness is possible to apply in report level or in univers
-
HI.. i m an abaper... i hv to show dead stock and dead stock value in a report for a given period of time here i m using table mbew but in this table only the current stock is given so how will i show it for a period of time suppose from july to dec.
-
Demand control key PM01 does not allow capacitive planning - ERROR MRSS
Hi Experts! I need help with an error that is being presented today at MRSS when I want to assign an operation to any of the resources the system is throwing the message: DEMAND CONTROL KEY XXXXXX does not allow capacitive planning. have not made co
-
How to convert a data set into a xml data and vice versa
i am new to oracle with xml.. my aim is to convert a data set into a xml data and vice versa.. my work is as follows... my query: select rggpk,rggcode,rggname from ms_regiongeo to convert a data set into a xml* select XMLType(trim(replace(dbms_xmlgen