How to retrive value from column of type number
Hi,
I have a site column 'Sample' which is of type Number. Number of decimal places for the column is specified as 0.
Consider the Sample column has a value '2'.
When I retrieve the properties for Sample column, the value is displayed as 2.0000000
I am retrieving the listitem properties using SPListItem.Properties in ItemCheckedin event.
How to get value without the decimal places?
Thanks in advance,
dhijit
Hi.
You can cast this value as int.
int myVal = (int)myItem["myField"];
if cast crashes, try to use int.TryParse or Convert.ToInt32 Mehods
Regards,
Bubu
http://zsvipullo.blogspot.it
Please mark my answer if it helped you, I would greatly appreciate it.
Similar Messages
-
How to retrive value from SVG and put in XLS(excel) file ?
Hello all,
I ll appreciate you if you help me in this issue,
My Project Manager give me a task of creating a java program to take values from SVG file and put that data into a particular cell.
Can you give me some favourable hints to help in this issue.
Thanks in advance.
JaisonIf by "array format" you mean comma-separated, why not
FOR x IN v_searchResult.FIRST .. v_searchResult.LAST
LOOP
v_id := v_id || TO_CHAR(v_searchResult(i).Product_ID);
END LOOP;or even better....
FOR x IN v_searchResult.FIRST .. v_searchResult.LAST
LOOP
IF x = v_searchResult.FIRST
THEN
v_id TO_CHAR(v_searchResult(x).Product_ID);
ELSE
v_id := v_id ||','|| TO_CHAR(v_searchResult(x).Product_ID);
END IF;
END LOOP;Cheers, APC -
How to return Values from Oracle Object Type to Java Class Object
Hello,
i have created an Oracle Object Types in the Database. Then i created Java classes with "jpub" of these types. Here is an example of the type.
CREATE OR REPLACE TYPE person_type AS OBJECT
ID NUMBER,
vorname VARCHAR2(30),
nachname VARCHAR2(30),
geburtstag DATE,
CONSTRUCTOR FUNCTION person_type RETURN SELF AS RESULT,
CONSTRUCTOR FUNCTION person_type(p_id NUMBER) RETURN SELF AS RESULT,
CONSTRUCTOR FUNCTION person_type(p_vorname VARCHAR2,
p_nachname VARCHAR2,
p_geburtstag DATE) RETURN SELF AS RESULT,
MEMBER FUNCTION object_exists(p_id NUMBER) RETURN BOOLEAN,
MEMBER PROCEDURE load_object(p_id NUMBER),
MEMBER PROCEDURE save_object,
MEMBER PROCEDURE insert_object,
MEMBER PROCEDURE update_object,
MEMBER PROCEDURE delete_object
MEMBER PROCEDURE load_object(p_id NUMBER) IS
BEGIN
SELECT p.id, p.vorname, p.nachname, p.geburtstag
INTO SELF.ID, SELF.vorname, self.nachname, SELF.geburtstag
FROM person p
WHERE p.id = p_id;
END;
My problem is, that if i use the member function "load_object" from my java app it doesnt return the selected values to the java class and i dont know why. I use the java class like this:
PersonObjectType p = new PersonObjectType();
p.load_object(4);
There is a reocrd in the database with id = 4 and the function will execute successful. But if i try to use "p.getVorname()" i always get "NULL". Can someone tell me how to do that?
Thanks a lot.
Edited by: NTbc on 13.07.2010 15:36
Edited by: NTbc on 13.07.2010 15:36CallableStatement =
"DECLARE
a person_type;
BEGIN
a.load_object(4);
? := a;
END;"
And register as an out parameter.
Edited by: michael76 on 14.07.2010 05:01 -
How to retrive data from selected checkboxes with fieldnames
hi experts,
how to retrive data from selected checkboxes with fieldnames into another alv grid report.(here the fieldnames selected from table names is dynamically).
thankx in advance
rani.k.Hi,
Use user_command in the alv grid and then
do the follwoing code
FORM user_command1 USING lv_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Declaration of local Variables
DATA : lv_ref1 TYPE REF TO cl_gui_alv_grid.
DATA lv_cnt TYPE i. "+INS SUHESH 12.07.2008
Check function code
CASE lv_ucomm.
WHEN 'ONLI'.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = lv_ref1.
CALL METHOD lv_ref1->check_changed_data.
now loop ur final internal table where check = 'X'.
now pass data to other internal table..Now the internal table will be having values that the user selcetd on the screen.
Hope this helps.
Regards,
Nagaraj -
How to assigne value in sub record type
Dear below mention record type database,now i want to assigne value in payr_rec type,in this recrocrd type have one column party_id,but how can assigne value int this field ,
TYPE group_rec_type IS RECORD(
group_name VARCHAR2(255),
group_type VARCHAR2(30),
created_by_module VARCHAR2(150),
-- Bug 2467872
mission_statement VARCHAR2(2000),
application_id NUMBER,
party_rec PARTY_REC_TYPE := G_MISS_PARTY_REC
please guide.to get the desired default party_rec attribute value, just assign the "sub-record" attribute defaults as desired; PL/SQL will assign a default (non-null) record as the party_rec value using those attribute defaults:
create or replace package P_Test_It
as
type party_rec_type is record (
dummy varchar2(1) default 'X'
type group_rec_type is record (
group_name VARCHAR2(255),
group_type VARCHAR2(30),
created_by_module VARCHAR2(150),
-- Bug 2467872
mission_statement VARCHAR2(2000),
application_id NUMBER,
party_rec PARTY_REC_TYPE
end;
set serveroutput on
declare
rec p_test_it.group_rec_type;
begin
dbms_output.put_line(rec.party_rec.dummy);
end;
X
PL/SQL procedure successfully completed.Hope it helps.
Gerard -
How to retrive data from the database by using resultset metadata
Hi
I am very new to java programing.please help me anyone...
In my table 20 fields are there.I want to retrive those fields and put it into arraylist.and return the arraylist.
regards
guruFirst get Column count by using getColumnCount() method
Then Get The Column name by using getColumnName(int column)
By using column name You can retrieve values
eg:
String columeName=null;
int count = mymetadata.getColumnCount();
for(int i=1;i<=count;i++) {
columeName = getColumnName(i);
//Retrive values from resultset buy using columeName
} -
How to retrive data from this inernal table
hi,
could u please explain clearly how to retrive the records from this structure
data: begin of itab.
include structure sflite.
data:end of itab.
how to retrive data from this structure could u plz give me a code with example.Hi,
TYPES: BEGIN OF struc1,
val1 TYPE c,
val2 TYPE c,
END OF struc1,
BEGIN OF struc2,
val type struc1,
val3 TYPE c,
val4 TYPE c,
END OF struc2.
DATA: l_f_str1 type struc1,
l_f_str2 type struc2.
START-OF-SELECTION.
l_f_str2-val-val2 = 'a'.
write : / l_f_str2-val-val2.
END-OF-SELECTION. -
CE function to get distinct values from Column table
Hi All,
Could you please let me know the appropriate CE function to get the distinct values from column table.
IT_WORK = SELECT DISTINCT AUFNR FROM :IT_WO_DETAILS;
Thank you.Hi,
If you have 10g, you can use Model( with model performance is better than connect by )
Solution
========================================================================
WITH t AS
(SELECT '0989.726332, 1234.567432, 3453.736379, 3453.736379, 0989.726332, 3453.736379, 1234.567432, 1234.567432, 0989.726332'
txt
FROM DUAL)
SELECT DISTINCT TRIM(CHAINE)
FROM T
MODEL
RETURN UPDATED ROWS
DIMENSION BY (0 POSITION)
MEASURES (CAST( ' ' AS VARCHAR2(50)) AS CHAINE ,txt ,LENGTH(REGEXP_REPLACE(txt,'[^,]+',''))+1 NB_MOT)
RULES
(CHAINE[FOR POSITION FROM 1 TO NVL(NB_MOT[0],1) INCREMENT 1] =
CASE WHEN NB_MOT[0] IS NULL THEN TXT[0] ELSE REGEXP_SUBSTR(txt[0],'[^,]+',1,CV(POSITION)) END );
=========================================================================
Demo
=======================================================================
SQL> WITH t AS
2 (SELECT '0989.726332, 1234.567432, 3453.736379, 3453.736379, 0989.726332, 3453.736379, 123
4.567432, 1234.567432, 0989.726332'
3 txt
4 FROM DUAL)
5 SELECT DISTINCT TRIM(CHAINE)
6 FROM T
7 MODEL
8 RETURN UPDATED ROWS
9 DIMENSION BY (0 POSITION)
10 MEASURES (CAST( ' ' AS VARCHAR2(50)) AS CHAINE ,txt ,LENGTH(REGEXP_REPLACE(txt,'[^,]+',''))+1 NB_MOT)
11 RULES
12 (CHAINE[FOR POSITION FROM 1 TO NVL(NB_MOT[0],1) INCREMENT 1] =
13 CASE WHEN NB_MOT[0] IS NULL THEN TXT[0] ELSE REGEXP_SUBSTR(txt[0],'[^,]+',1,CV(POSITION)) END );
TRIM(CHAINE)
3453.736379
1234.567432
0989.726332
SQL>
======================================================================== -
How to retrieve value from xml file
hi all,
can somebody pls tell me how to retrieve value from xml file using SAXParser.
I want to retrieve value of only one tag and have to perform some validation with that value.
it's urgent .
pls help me out
thnx in adv.
rituhi shanu,
the pbm is solved, now i m able to access XXX no. in action class & i m able to validate it. The only thing which i want to know is it ok to declare static ArrayList as i have done in this code. i mean will it affect the performance or functionality of the system.
pls have a look at the following code snippet.
public class XMLValidator {
static ArrayList strXXX = new ArrayList();
public void validate(){
factory.setValidating(true);
parser = factory.newSAXParser();
//all factory code is here only
parser.parse(xmlURI, new XMLErrorHandler());
public void setXXX(String pstrXXX){
strUpn.add(pstrXXX);
public ArrayList getXXX(){
return strXXX;
class XMLErrorHandler extends DefaultHandler {
String tagName = "";
String tagValue = "";
String applicationRefNo = "";
String XXXValue ="";
String XXXNo = "";
XMLValidator objXmlValidator = new XMLValidator();
public void startElement(String uri, String name, String qName, Attributes atts) {
tagName = qName;
public void characters(char ch[], int start, int length) {
if ("Reference".equals(tagName)) {
tagValue = new String(ch, start, length).trim();
if (tagValue.length() > 0) {
RefNo = new String(ch, start, length);
if ("XXX".equals(tagName)) {
XXXValue = new String(ch, start, length).trim();
if (XXXValue.length() > 0) {
XXXNo = new String(ch, start, length);
public void endElement(String uri, String localName, String qName) throws SAXException {
if(qName.equalsIgnoreCase("XXX")) {
objXmlValidator.setXXX(XXXNo);
thnx & Regards,
ritu -
How to get value from list item
Hi all,
How to get value from list item?
I have a problem with the List Item object
in the Oracle forms.
How can I retrieve the selected item from
a list ?
I didn't find any function like 'list.GET_
SELECTED_ITEM()'...
thanks
BalaHello,
You get the value as for any other Forms item:
:value := :block.list_tem ;Francois -
HOW to retrive data from SAP Tabel
Hi Friends,
1)Can you please explain how to retrive data from SAP table(example AFRU).
2) we had requriment based on the qunatity , Product name and date we need to display KPI's .KPI is based no products manfactured per day with some conditions
Regards
SrikanthHi Udayan,
I want to retrive SAP Table data from xMII.can you please explain elabarately how to call "RFC_READ_TABLE" from xMII.
please do the needful
Thanks
Srikanth -
How to move value from one tlist to another tlist in same form?
how to move value from one tlist to another tlist in same form on button press?
Same like in data block wizard when we select value from 1st list it will go to 2nd list and can be move back. Please help i am new to forms .
Regardsjust call the following proc in your add & add all buttons. Reverse the code for REMOVEs
this proc will move one item at a time from list_item1 to list_item2.
PROCEDURE add_an_item
IS
v_list_count NUMBER;
v_item1_label VARCHAR2(60);
BEGIN
IF :list_item1 IS NOT NULL THEN v_list_count := nvl(Get_List_Element_Count('list_item1'),0);
IF v_list_count >= 1 THEN FOR i IN 1..v_list_count
LOOP
IF :list_item1 = Get_List_Element_Value('list_item1', i)
THEN
v_item1_label := Get_List_Element_label('list_item1', i);
Add_List_Element('list_item2',1,v_item_label,:list_item1);
Delete_List_Element('list_item1',i);
Exit;
END IF;
END LOOP;
END IF;
END IF;
END;
*********************************************************************************this proc will move all items from list_item1 to list_item2.
PROCEDURE add_all_items
IS
v_list_count NUMBER;
v_item_label VARCHAR2(60);
v_item_value VARCHAR2(60);
BEGIN
v_list_count := nvl(Get_List_Element_Count('list_item1'),0);
IF v_list_count = 1 AND Get_List_Element_Value('list_item1', 1) IS NULL THEN NULL;
ELSIF v_list_count >= 1 THEN
FOR i IN 1..v_list_count
LOOP
v_item_value := Get_List_Element_Value('list_item1', i);
v_item_label := Get_List_Element_label('list_item1', i);
Add_List_Element('list_item2',i,v_item_label,v_item_value);
END LOOP;
clear_list('list_item1');
END IF;
END;I added [ code ] tags to make this easier to read.
Message was edited by:
Jan Carlin -
How to retrive data from MYSQL database beginner question
I need to know a method, on how to retrieve values from a MYSQL database. I finally managed to insert data to a MySql database using hibernate, with the help of google. but, i couldn't find any helpful article on google, on retrieving data, will some plzz help me, by directing me to a site that has sample codes ??
i am actually new to MYSql and Databases in java, so plzz do help me, i am lost here,,, :(Oh, it's Hibernate. In the future, please use the forums at their own site.
Answers on how to use Hibernate are usually available in the excellent "Hibernate Reference Documentation" available here. -
How to retrive data from database views or projection views
how to retrive data from database views or projection views
Hi chintam,
1. Very simple
2. Just like normal select statement.
3. Select * from VIEWNAME.
4. (Instead of the tablename, we just have to give the viewname)
regards,
amit m. -
How to read values from DMM4040
Hi,
I am using DMM4040, NI PXI 6509 device.
I need to make some port pins high which i have already done and now i have to read value captured by DMM then i have to make my port pins low if my value is within limits.
Can u suggest me how to read values from DMM and then by notification i ll make my port pins low.
'' A professional is someone who can do his best work when he doesn't feel like it''...........What language are you using? If using LabVIEW, you use the NI-DMM API to communicate with the 4040. Just take your reading, do your limit comparison, and set your lines based on the comparison results.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Maybe you are looking for
-
How to delete the single record from the ODS
HI, I want to DELETE the particular record from ODS.. how to delete that.. plz give me the solution.. it's urgent.. with regards @jay
-
Modify ATP Category of an Order
Hi, I have to modify the Category(AI) of an Order during the CTM run. I looked into the BADI /SAPAPO/CTM_ORDERS But it seemd not to work. Appreciate If you please let me know where we can modfiy it. Thanks
-
Remove OLD Slave iFolders from iFolder Master
I have a old iFolder slave server that appears unders "Servers" when viewing servers in the iFolder 3.7 server administration tab. This server is no longer around. When you click on the server it returns an error. How does one go about removing a "de
-
T-Code BP ( Type Contact Person ) with multiple correspondence languages?
Is there way that we can create Contact person with multiple correspondence languages? There is no way in the system to maintain multiple correspondence languages? How can we do it? Please advice. Thanks,
-
Repository Objct and DDIC Objct
What is Repository object and DDIC object??Also give examples.