IPhone: Textfield format with one decimal integer - iphone

I am presenting the user with a field that displays the number keyboard and only want them to be able to enter numbers with decimal it should be only one. After decimal it is should be atleast 2 digits will be there. There should be atleast one digit before the decimal.Then the input can`t be 0 or 0.00. Suppose if user enter the number 123456 it is accepted then 123.56 it also accepted if user enter 123 and then it it take 000123 and how can i take maximum length of the textfield is 6 and minimum is 1 please help me this one..

You need a regular expression for this task. This SO post should have an answer for you.

Related

Is there a DevExpress DateEdit mode where users can type numbers without slash delimiter

Users who are used to working with another software package would like to type just the numbers of dates, without slashes: 0 9 1 8 2 0 1 7. They have developed "muscle-memory" for dates and are pretty grumpy about having to enter the slashes.
This is a "heads down" data-entry scenario where they have to enter hundreds of dates, and speed is a concern. They say that they often have to enter dates from previous years, and it takes too long to navigate to the past years using the dropdown calendar.
Is there a mode setting for the DevExpress DateEdit for Winforms which allows that mode of entry?
Try to specify a mask, I think it should work.
Set mask property, as you need.. but you must be clear what type of date format user will enter

crystal report how to display date in boxes of Bank Check Book

I want to print check from SAP Business one. I do all setting except the bank check Date have issue. in bank check the date is in boxes and having spacing.
can any one help me to how can i do it?
as Siva reccomended (or similar) ---
8 separate formulas
left(totext(Currentdate,'dd'),1) //d1
right(totext(Currentdate,'dd'),1) //d2
left(totext(Currentdate,'MM'),1) //m1
right(totext(Currentdate,'MM'),1) //m2
left(totext(Currentdate,'yyyy'),1) //y1
mid(totext(Currentdate,'yyyy'),2,1) //y2
mid(totext(Currentdate,'yyyy'),3,1) //y3
mid(totext(Currentdate,'yyyy'),4,1) //y4
Place in report and format each to have top, bottom, left and right borders.
take as mnay formulas as many characters in date and in each formula take one date character and display all formulas side by side.
you can extract single chracters ny conveting date to strings.
after placing all formulas side by side, Apply borders for those formulas.
For PLD in SAP Business One use the following formula
F_108==>
Document Date
F_195==>
Substring(Concat("0",Day(F_108)),Length(Concat("0",Day(F_108)))-2,Length(Concat("0",Day(F_108)))) --> Day 2 result is 02 & for day 28 result is 28
Substring(F_195,0,1) -->Extract the left digit & used to display in cheque i.e 0 or 2 from the above example
Substring(F_195,1,2) -->Extract the right digit & used to display in cheque i.e 2 or 8 from the above example
Do the same for month by replacing the Day() with Month()
Thanks

number representing text string

A web form collects data on students in a band organization at school. The form data is fed into a google sheet that then populates a merge template and the merged forms are emailed to the recipient. A parent needs to print, sign and turn in the forms. There are hundreds of kids in this band and at registration time when the forms are turned in it is easier to sort all the papers in the stack if you have a short sort number in the corner... Volunteer kids don't apply alphabetization well. I'm trying to create a formula that will give me that sorting number to merge onto the header of each page of the PDF they receive after submitting the form. I want it based on last name and then first name and be able to create that number (in the google sheet) on the fly because the merging happens almost instantly when the user submits the form. Hence, an excel type formula is desired that will result in a number representing the kids name. I'd like for each number to be unique but some names are the same for the first few letters, also some names are only 2 characters long. I tried making A=10, B=11, z=35 etc. (so all are 2 digits) So, using only the first 3 characters, Bob Jones would = 192423112411 - hardly easy to sort the paper at a glance and it doesn't really differentiate between Bob Janes either. 4 digits is preferable. I also looked at =code() formula and it came out with long numbers too. Any advice is appreciated. Thanks!
Side note: What method do spreadsheets use to sort text? Do they weight the characters or what? Before I got the automerge thing to work I assigned each kid in the list a number higher than the one below and lower than above (on the sheet), then did the merge.
One option is to:
sort the name list alphabetically
add a sort number column, and put a =TEXT(row(),"0000") formula to generate a unique ID
on the merge spreadsheet, use a VLOOKUP function to retrieve the unique ID for that specific name.
First off, that wall of text was kind of hard to read through. Please try and do a little formatting so the people trying to help you can easily follow what you're trying to convey.
Personally I would suggest a hyphenated system. First initial of last name converted to a number, followed by a hyphen, followed by the first two letters of their first name converted to numbers.
Bob Jones becomes 11-1956 assuming you differentiate between upper and lower case, or 11-1924 if you convert everything to upper case, which I guess makes more sense.
You could use this VBA function to convert names to a system like that:
Function ConvertToIndex(strInput As String) As String
Dim strLast As String
Dim arrName() As String
Dim strFirst1 As String
Dim strFirst2 As String
arrName = Split(strInput, " ")
strLast = Mid(arrName(1), 1, 1)
strFirst1 = Mid(arrName(0), 1, 1)
strFirst2 = Mid(arrName(0), 2, 1)
ConvertToIndex = Asc(UCase(strLast)) - 55 & "-" & Asc(UCase(strFirst1)) - 55 & Asc(UCase(strFirst2)) - 55
'MsgBox ConvertToIndex
End Function
Thank you Tim, Nutsch and Mad Tech for your responses. I appreciate your input. Sorry the paragraph was so long, I get wordy. Because the members get their merged PDF sheet immediately after submitting I need the number to be based on the name as soon as it's entered, not after the fact; so I was looking for a formula that would reside in the sheet. Interesting VBA function too though. I'll settle for numbering them afterwards, maybe when the sheets are turned in. By then I'll know all who are in the band and can assign numbers like before. Thanks again!

Is there a way to get the page number of the start of a paragraph with Applescript in Mac Word 2011?

I have a Word document and want to get the page number for any arbitrary paragraph within the document. I realise that paragraphs can span pages, so I actually need to ask about the start (or end) of the paragraph. Something like this pseudocode:
set the_page_number to page number of character 1 of paragraph 1 of my_document
I haven't been able to figure out how you link a range object with any kind of information about its rendering and am officially baffled.
Does anyone know the proper way?
I just found this question about dealing with this in C#: How do I find the page number for a Word Paragraph?
Poking around in the answer to that I found reference to range.get_Information(Word.WdInformation.wdActiveEndPageNumber)
It turns out there's a get range information command in the applescript dictionary, so you can do this:
set the_range to text object of character 1 of paragraph 123 of the_document
set page_number to get range information the_range information type active end adjusted page number
That'll get the page number that would be printed (e.g. if you'd set the document to start at page 42, this will produce the number you expect). Or, you can get the number without adjustment, i.e. your document page numbering is set to start at 42, but you want the page number as if numbering started at 1.
set the_range to text object of character 1 of paragraph 456 of the_document
set page_number to get range information the_range information type active end page number
Phew.

Compare the last digit of a string with that at the same place of another string

I need to compare 2 numeric strings in iOS. The first string, stored, is a fixed long number, and I want to check that the last digit of the second string entered is the same as the corresponding digit on the stored string (which isn't necessarily the last digit).
For example...
entered = 123456789
stored = 12345678902345678
In this example, I'd like to check that 9 on entered is the same as the digit in the same position on stored.
I'm thinking there's 2 possible ways of achieving this, but if there's a simpler way that'd be great...
Check the entered string length and compare the character at that position of entered and stored.
Check if the entered string is equal to the value of the corresponding length in stored.
Could someone please offer some advice in this area.
Breaking up the 'about to get stored' string in character set and comparing the 9th element (or with whatever position of element you want to compare) with the 9th element of the existing stored string.
Have a look at this: Breaking NSString 'word' in characters..
After breaking up 'about-to-get-stored' NSString in characters, take the 9th element and then get its intValue (like [lastElement intValue];) and on the other side retrieve your 'already-stored' NSString, break up in characters, take the 9th element and then get its intValue (as shown above) and now you have two int values, you can easily compare two integers..
Hope that helps a little. :)