how to read value

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

how to read value

Postby ravneet_24 » Tue Sep 21, 2004 5:42 am

i made a form with a submit button and a field A. my question is how to read information from field A ,when i press sumbit button
I'm ravneet kaur dilawari
ravneet_24
 
Posts: 1
Joined: Tue Sep 21, 2004 5:33 am
Location: Bhopal

Postby Harry Catharell » Wed Sep 22, 2004 12:23 pm

Hi Ravneet,

Create a method and attach it to the button with the following in it :
Code: Select all
var x = currentcontroller.getDataProviderValue(dataProviderName as a string)
e.g.
var x = currentcontroller.getDataProviderValue('org_name')

This will set the variable 'x' with the value held in the 'org_name' field

You can then do what you want with 'x' !!

The string that you pass to the function must be the Data Provider (table column) name and not the element name that you may have named it on the form !

Hope this helps.

One further tip is that your post here may have been overlooked as this section of the forum is where members will post outlines of how they have resolved problems or methodologies in how to perform specific processes - check out the other posts in here and see.
Put your future posts into other relevant sections like : 'Programming', 'Forms', 'Methods' etc where your questions are particular to the section name - If in doubt read the description of the forum section to decide whether it is the correct place.

Cheers and welcome to wonderful world of Servoy !

Harry
Harry Catharell
 
Posts: 812
Joined: Fri Sep 26, 2003 10:23 am
Location: Milton Keynes, England


Return to How To

Who is online

Users browsing this forum: No registered users and 9 guests