Counting letters in a field
I have a field and for example inside it has the word "hello"
and the "llo" in the text is red and the "he" is in gray... I want
a script so that in the message window, it displays the number of
words either in gray or red.. please help me find it ASAP
let me help you by asking a few questions:
1. first, how would you get a character from a field member?
member("some_field").char[1]
2. next how would you get the colour of that character?
member("some_field").chare[1].color
3. after that, how would you then loop through each character
in a member?
Now, as for words... well, it's very similar, but you have to
be a bit clearer as to what you want - characters or words.
Similar Messages
-
Line chart to plot count of 2 date fields against calendar month
Post Author: springle
CA Forum: Charts and Graphs
I would like to create a line chart with 2 lines. I would like the x axis to be a calendar month. I would like the y axis to be the count of a date field for that month. I would like 2 lines, one the the count of applications recieved in a month and the other to be the number of shipments in a month. I can make a chart to plot one or the other but not both on one chart.So in summary I want of a count of date1 and a count of date2 by calendar month in one line chart.Thanks in advance,ScottPost Author: springle
CA Forum: Charts and Graphs
Thanks for the reply but I am afraid this does not solve my problem. Your proposal make the month count of Date1 records in the fields and the count of Date2 in the month of date1 I am try to graph...In the month of Jan: 56 apps and 49 deliveriesIn the month of Feb: 76 apps and 79 deliveriesIn the month of Feb: 86 apps and 69 deliveriesThe change on date cannot be either app date or del date. It needs to be independent from a calendar timeline. Scott -
Select only the first 10 letters of a field...
Hi Guys,
How is the correct select statement, if I'd like to compare just the first 10 letters from a field with an other field? '+0(10)' did not work...
select * from /BIC/AWEGLRDU200 into table IT_AWEGLRDU200
where /BIC/WE_AWKEY+0(10) =
<RESULT_FIELDS>-/BIC/ME_BELNR
AND /BIC/WE_AWTYP NE 'BKPF'.
Thanks...Basic question locked.
Try F1 on SELECT -
Urgent help!!how to count the no of fields retrieved by recordset??
hello friends,
i need to count the no of fields and not rows returned by the recordset
plz. help me soon,
Ex. rs.executeQuery("select * from table");
now how many columns will be there in the table,i need to know that
thanx in advance,its urgent so reply soon,
Vishalhey, i am getting an error as follows
cannot resolve symbol
symbol : method getMetaData (java.lang.String)
location: class front1
ResultSetMetaData rmd= getMetaData(globals.s);
^
1 error
can u expand the code a bit , so this error is solved ?
thanx again -
How to display a record count in a text field?
I am trying to return a record count of a query and place that count in a text field on my search page in APEX. I have that text field defined under Items on the search page. How do I get a query record count to display in my text field?
Thanks,
John
Edited by: user7381760 on Jan 22, 2009 3:47 PMHi Dan,
Thank you for your reply and yes I was able to select "Source Type" and "SQL Query". The SQL expression I used was:
SELECT COUNT(ID) FROM master_table;
This worked great to count the total number of records from the master_table. However what I am trying to do is to get a record count each time I complete a search from my search page. I have input fields on this page and a GO button which executes the query. The SQL query is location in one place under Regions/Display Point. My display field on my search page is named P16_COUNT2 and I was trying to make this work inside the main query code. I tryed something like this, COUNT(ID) INTO :P16_COUNT2, to pass the record count each time I execute the GO botton to P16_COUNT2 field. This I could not get to work. Any ideas how to proceed?
Regards,
John -
I am using lingo to count and display letters in a word but my script is stuck on a point. Can any help to solve this?
property
SpriteNum
global
gCurrentCounter, CurrentWord, lettersofCurrentWord, sSoundName
On
MouseDown me
if gCurrentCounter < 10 then
p = "00" & gCurrentCounter
else if gCurrentCounter < 100 then
p = "0" & gCurrentCounter
elsep = gCurrentCounterend ifj = 1
letter_no = spritenum
letter_name = member("PE_" & string(j)).text
letter_uppercase = "A"
-- puppetSound 1, "A sound"
CurrentWord = member("word - " & p)i =
1
If sprite (letter_no).within(sprite(spritenum)) Thenif
charToNum(member(CurrentWord).paragraph[1].char[1]) <= 90 then
member ("pe_space_" & string(i)).text = letter_uppercase
elsemember ("pe_space_" & string(i)).text = letter_name
end if
end if set the loc of sprite letter_no to point(300,330)
-- i = 2
put i
-- repeat while i <= CurrentWord.char.count
if charToNum(member(CurrentWord).paragraph[1].char[i]) >= 200 then
member ("pe_space_" & string(i)).text = member(CurrentWord).paragraph[1].char[i]
sprite (letter_no).within(sprite (10 + i))
elsemember ("pe_space_" & string(i)).text = letter_name
end if
i = i + 1
-- end repeat
end mousedown me
end**** Hello Sean see responses to questions in RED
So what sort of sprite/member holds the completed word?
Sean - A complete set of sprite equal the number of letters in
the word named pe_space_
Presumably the code you posted is attached to individual letters of the
alphabet?
Sean - You assumed right
I have re-posted your code with questions and comments interspersed -
perhaps you could addess some of these:
global gCurrentCounter, CurrentWord, lettersofCurrentWord, sSoundName
property SpriteNum
on mouseDown me
if gCurrentCounter < 10 then
p = "00" & gCurrentCounter
else if gCurrentCounter < 100 then
p = "0" & gCurrentCounter
else
p = gCurrentCounter
end if
j = 1
letter_no = spritenum
-- I don't understand: since you declared j = 1
-- your local var 'letter_name' will always be member("PE_1").text
letter_name = member("PE_" & string(j)).text
-- again, you have hard-coded something with no apparent reason
letter_uppercase = "A" *** Sean - In case the first letter is uppercase
-- puppetSound 1, "A sound"
CurrentWord = member("word - " & p)
i = 1
if sprite (letter_no).within(sprite(spritenum)) then
if charToNum(member(CurrentWord).paragraph[1].char[1]) <= 90 then
member("pe_space_" & string(i)).text = letter_uppercase
else
member("pe_space_" & string(i)).text = letter_name
end if
end if
sprite(letter_no).loc = point(300,330)
-- i = 2
-- i will always equal 1 because that's how you declared it above, and it
isn't changed
Yes Sean, this is the reason for my been stuck on the first sprite
or letter of my word. I was hoping to achive repeat effect by clicking on the mouse
or keydown to get word spelt.
But on mouseDown me or keyDown does not work with my code
put i - This tell me that I am stuck on i = 1
-- can you explain what this block of code is doing?
-- I have no idea what the various members
-- member("pe_space_" & string(i))
-- are or how they're used
Sean the pe_space_ are the fields where my letter PE_ get attached to,
so when I release my letters on grab and move they are within these
sprites/fields
So, Sean can still help?
repeat while i <= CurrentWord.char.count
if charToNum(member(CurrentWord).paragraph[1].char[i]) >= 200 then
member("pe_space_" & string(i)).text =
member(CurrentWord).paragraph[1].char[i]
-- 'within' is an operator that returns TRUE/FALSE
-- so it isn't clear what you're trying to do here
sprite(letter_no).within(sprite (10 + i))
else
member("pe_space_" & string(i)).text = letter_name
end if
i = i + 1
end repeat
end mouseDown
Message was edited by: efeelo -
How do I limit the character count in a text field?
I'm creating a form for co-workers to use when creating web content. I need to restrict their character count for items like headlines, titles, subtitles, etc. Any suggestions on a ready-made form to use out there? And how can I limit those fields so they don't generate content that will then need to be edited down?
Thanks,
EAWCheck out this post:
http://forums.adobe.com/message/4364378
Randy -
Distinct count on date/time field...
Hi,
I am trying to a distinct count on this formula that takes a date/time field and converts it to a date in order to get a distinct count of dates. However, it's not working... say, if I have two dates are the same (the times may be different), it's counted twice. Any suggestions? I tried to convert this to a string thinking the evaluation may change, but no dice. Thanks!!
if not isnull({AVAILABILITY.PAT_ENC_CSN_ID}) then
cstr(cdate({AVAILABILITY.SLOT_BEGIN_TIME}))
elseYou can use the following formula...
DateAdd("d", DateDiff("d", #1/1/1900#, {TableName.YourDateTimeField}), #1/1/1900#)
This will set each date value to 12:00 am of it's respective day...
So 8/16/2010 3:01:20PM would become 8/16/2010 12:00:00AM
Now you can group on this formula field and then simply do a count on the date at the appropriate group level.
HTH,
Jason -
Ich habe folgende Frage: Ist es mit inDesign CS6 möglich, ein interaktives PDF zu kreieren, in dem die zulässige Wortzahl in einem Feld genau definiert wird?
Im speziellen Fall möchte ich ein Eingabefeld auf eine DIN A4 Seite setzen, welches exakt 350 Wörter erfordert, um die Seite druckbar zu machen... Mehr Wörter sollten nicht eingegeben werden können und sollten es weniger sein, ist ein Drucken nicht möglich...
I have the following question: Does InDesign CS6 offer am option to create an interactive PDF with a text/form field which allows ONLY a defined number of words?
In this particular case I would like to create a DIN A4 page with a file dwhich allows for exactly 350 words to make the document printable. If one put's in less than 350 printing should be disallowed and at the same time it should be impossible to type more than the allowed number of words.
Jörg Hippo ThomsenHi Steve!
Thanks to a google search I have managed to solve the issue flawlessly
Look at this little java script:
var val = event.value + event.change,
matches = val.match(/\b[\w\-\']+\b/g),
count = matches.length;
this.getField("charCount").value = count;
if (count > 90) { app.alert("You have exceeded the maximum of 90 words for this text field.") }
1. This script needs to be inserted under Properties/Format/Custom/Custom Key Stroke Script.
2. One creates a second fiield namend charCount to display the word count.
Voila! The text field will pop up a warning if the allowed maximum word count is exceeded and it will display the word count in the extra field -
Problem forcing lower case letters in a field using a javascript action bar
Following a tips and tricks site I found I am attempting to implement a global web applet toolbar that will force the letters entered into a given field into lower case.
As far as I can tell, I've done everything correctly, but it's not changing the field. Does anyone have any idea what I may have done wrong?
<script>
function lowercaseInput()
var INPUT_ID = 'AccountDetailForm.Field Name';
var elem = document.getElementById(INPUT_ID);
if( elem != null )
elem.style.textTransform = 'lowercase'
try {
elem.addEventListener('keyup',function (e) { this.value=this.value.toLowerCase();
}, true);
} catch(e){
elem.attachEvent('onkeyup', function (e) { this.value=this.value.toLowerCase(); });
setTimeout ( "lowercaseInput()",2000 );
</script>You have to send the other information and update it all
-
Count Function on Date Field in Discoverer
Hey folks,
How would someone like to educate a novice on how to perform a count function on a date field? I am writing a Discoverer report and have a requirement to display counts of the number of records that have a modified date of > 30 days and > 60 days. I am trying to use the 2nd count function as such: COUNT(modified_date < (SYSDATE - 30)). I keep getting the "error in function" message. I have tried it with CURRENT_DATE as well and get the same error.
Any help would be greatly appreciated.
Thanks much,
SchuylerHi
You can't use logical expression in a function like this:
COUNT(modified_date < (SYSDATE - 30))
instead of this use CASE expression:
COUNT(case when modified_date < (SYSDATE - 30) then 1 else 0 end)
Ott Karesz
http://www.trendo-kft.hu -
BEx Designer: How to count if an InfoObject(field=ProblemNr) is empty
Hi,
in the ROWS i have an InfoObject (let's say ProblemNumber) and in the COLUMNS another InfoObject (Date).
The IO in the Rows is not a primary key and it's not always filled in. The OrderNr might be a primary key.
I want to find out how many of the entries in a specific month (IO Date) have ProblemNr and how many not.
So basically would lool like the following:
April
With ProblemNr: 25
W/o Problem Nr: 18
Would you give me tips how i can show such a result.
Thank you!I have two Field in the Multiprovider: DocNumber & DeliveryDate.
In the Query Design I created a Count (Calculated Key Figure) to count the entries
since Iu2019m not allowed to change anything in the Data Model.
The DocNumber might and might not have a DeliveryDate, Ex:
DocNumber DeliveryDate
1234 12.03.11
2345 --
4567 11.01.10
6789 01.05.11
So i need to design a Query to count Number of Documents (DocNumber ) that have
No(Empty) DeliveryDate & also Number of Documents (DocNumber ) that
have DeliveryDate.
So the result would look like something like this:
April May June July
No DeliveryDate 54 23 22 56
With DeliveryDate 32 3 52 26
So there are 54 Documents that have DeliveryDate Field empty and
32 Documents with DeliveryDate filled in. -
How to use Count with other all fields
Hello guys. Sorry about my question because it s syntax but i didnt find in google.
How can i use count combined with other all fields.
Like SELECT count(*) 'other all fields like * ' FROM VBAK .
Thank you very much.Don't sure to understand your requirement (count would always be 1, aggregates are only defined with grouping)
So either use two SELECT (or replace count(*) counting Nr of records selected) if no relation between count and field values....
Or use a dynamic SELECT syntax. Use FM DDIF_FIELDINFO_GET to get field list, then create fieldlist with every field name and count(*), create grouplist with every field name
SELECT (fieldlist)
INTO ...
FROM table
GROUP BY (grouplist).
Regards,
Ramond -
Count based on Result field of query
Hai experts,
I created a query that will display result the following format.
Vendor SourcePurOrg PurGroup Outstanding amount (Keyfigure)
197702516C RSAF PURCH ORG Not assigned 297,294.24
Result 297,294.24
200003048E JOINT PURCH ORG Not assigned 21,196.00
RSAF PURCH ORG Not assigned 44,063.52
Result 65,259.52
My requirment is I need to count the vendors if their Result exceed certain amount (eg: 65,000).in different SourcePurOrg.
how can i achive this based on one keyfigure result field..This is a very urgent requirment.Pls help..
Thank you
AnishHi
You can create replacement path variable on vendor & create one calculated key figure, this will give you the count 1 for each vendor.Then you can apply condition as '<65000' , it will give you the count for that condition. -
Outgoing mail contains all-caps letters in "From" field email address
For some reason, all of a sudden Mail is sending email with all caps email addresses in the "From" field. Before the entire address was capitalized; now it's just my username (e.g. [email protected]).
This happened about a month ago and I noticed that in Address Book, my contact information (for myself) was in edit mode. I turned editing off and that seemed to fix the problem. But this time, Address Book is not even open. Any ideas as to why my outgoing email address in the From: field would change to all capital letters? It's definitely machine/software-specific as this does not happen on my other computer, a MacBook.Hi Sara,
I believe that selection is controlled by attribute typed_context->mail->GV_SELECTION_FROM.
So, when you populate the possible entries in typed_context->mail->gt_default_from_addresses, just try to fill your desired default value in mentioned attribute and check if that works.
Kind regards,
Garcia
Maybe you are looking for
-
hello can apple help me out.i am from Pakistan, i received iphone 4s as a gift, it was purchased in canada last march 2012. unfortunately its screen stopped working and inside screen when i try to look with external light. there was message "iphone d
-
Paste not working properly in DW for Mac
Ok, here's a gripe which has long irritated me, but which is so minor I've not bothered posting about it before now because by the time I fight my way through the Adobe site, login to the fora, type and post a message, I fixed the problem manually, b
-
Cant install hl 1450 printer on 10:6:8
problem installing drivers hl1450 printers on 10:6:8
-
Automatic generation of Idoc for outbound delivery
Hi Experts, I need to generate Idoc automatically for each outbound delivery created in VL01n. I just wanted to know that whether we need to asign output type for each delivery number manually or is there any automated process available to generate I
-
Help with setting/getting variables in app
Hi, I have an application which behaves in the following manner: 1. User logs in. 2. User is presented with a list of projects; user clicks on a project to drill down to that project. 3. User is presented with project information which includes 4 sep