i am trying to write the code to convert the numeric value in words but I've got the above error while executing the code
as you will go through pic no.6 i have put a value in numeric field name"GrandTotal" & when i moves down the courser to field name"Nett_Pay" the script must run and should convert the value like (as shown in pic no. 6 the numeric field has a value of 3825 & i wants to convert it E.g. "Rupees Three thousand eight hundred twenty five only")but the script dosen't performs the task as i desired. If you need the original file i can send it to you if you can give me your mail id.
OK, let's look at what the code is doing one line at a time.
var Y; initialize a variable "Y"
var Z; initialize a variable "Z"
Z = Table1.FooterRow.GrandTotal.rawValue; set the value in that cell to "Z"
Y = Nett_Pay.rawValue; Are you typing this in? It seems like you would want that filled in by something else. Each picture I've seen shows this field empty.
Y = Replace(Y,"Dolars","Rupees"); right now, Y is null, so there's nothing to replace.
Y = Replace(Y,"Cents", "Paise"); still null, so this doesn't do anything, either.
Nett_Pay.rawValue = Y; Y was null, so now Nett_Pay is null, too.
Maybe you want this:
Y = Table1.FooterRow.GrandTotal.rawValue; I'm guessing that this is a currency value, so...
Y = Replace(Y, "Dollars","Rupees");
Y = Replace(Y,"Cents","Paise");
Nett_Pay.rawValue = Y; place the currency value into this field with dollars changed to rupees and cents changed to paise.
please see this i have made further changes in script but i wouldn't get the desired results
OK, I'm trying to get an idea of where all of the fields are on your form. You have "Nett_pay" selected in the first picture. It looks like the only event that has a script is the "initialize" event. So, unless there's a button somewhere that causes that field to be generated later, that script only runs when you open the page.
Perhaps you could put that event on the "enter" event for whatever text field is captioned "Attended By." (TextField8, I would guess.) I would also guess that the "Nett_pay" field is protected, since you don't want people editing the amount of money you're paying them on that line. If you move it there, you'll cause that script to run once you tab down to it on the form. Your user will see that the cursor is in the "Attended By:" field, and the script will fill in the amount of money.
As for the button, you'd have to show the code or actionbuilder screen for us to help make sure it is deleting the correct row.
i have changed the same but still it dosen't work please see the attachment
please see while i am running the script it looks like this
in this screen shoot the curser is positioned at the field name"attended by" but it still dosen't work
The script fails because the SOM expression to the GrandTotal field in incomplete.
Change it into:
var Z = Table1.FooterRow.GrandTodal.rawValue
please see the error file listed below
Please see the numeric field properties shown in image inserted below
And now see the properities of text field along with script in image inserted below
now the problem is when i have rename the caption of numeric field it shows it on screne & it disturbes the formatting of the table so i have changed the name of these fields in binding section as shown in both images but i couldn't get the desired results & I also would like to know that when i have press the delete(-) button of table it deletes the very next record of the table it dosen't sounds good while we are using it. is it possible to resolve the issue?
Looks like you have a typo with the GrandTotal, make sure that's the field name. Also if there are none numeric characters in the field such as 2,000 (the comma) you'll get a ****** result