How to put a value into the Gauge object

Hi Experts
I would like to use the DS_1.getData() command to retrieve data from a query
and place it into a gauge (standard object in DS). What I understand is that
the getData command retrieves a float value and the gauge object expects an integer
value. I didn’t find a float to integer conversion so I tried a work around. It
looked something like this but it did not work:
GAUGE_1.setValue(Convert.stringToInt(Convert.floatToString(DS_1.getData("CKXYNLFBDHH0X2U91711DX83S",
{"ZQMSITEPD":'S999'}).value)));
The value from the float to string conversion holds the decimals like 49,937 and this creates an error in the conversion from
string to int.
Does anyone have an example on how to get data from a DS into a gauge?
Kind regards
Erik

HI Erik, have you tried to use the Convert object?
float can be converted to string with argument "###", this will round all numbers after colon.
eg.
var fullNumber = Convert.floatToString(55.83, "###");
var numberInt = Convert.stringToInt(fullNumber);
APPLICATION.createInfoMessage("Value " + numberInt);
fullNumber = Convert.floatToString(55.23, "###");
numberInt = Convert.stringToInt(fullNumber);
APPLICATION.createInfoMessage("Value " + numberInt);
see for many examples
Design Studio 1.3 Scripting Example to Convert String Number to Date
Regards, Karol

Similar Messages

  • How to put Variable value into Labeltext of a subcomponent WIB

    Hello
    In our Web Based Planning tool we uses Tabstrib_control component and the Label-Text is filled like 'Plan 2008'. (Our BPS = 3.5 and Web interface builder)
    I am looking for a way,how to put a variable into the Label field of the component.  I am not sure if there is a possibility to enhance the labelfield with variable values.
    Thanks a lof for any good idea.
    Best regards
    Christian
    Our BPS = 3.5 and Web interface builder

    Hello Christian,
    Maybe I have a solution for your problem.
    1. Create subcomponent "Selector variable" with your variable.
    2. Hide this new subcomponent
    3. Write in the Label-Text: <%=descr("Name of new subcomponent"/value)%>
    If the variable will be selected by the user in the web interface, put the name of this selector in the field "Update upon Change of" in the properties of the new created subcomponent.
    Hope this helps.
    Friedrich

  • JSP and JavaScript! How to put session values into html form?

    I have a master form which goes to detail form to input data and back to master to Confirm submit operation. I want to put all the form data into request or session variable so it can be retrieved in both the forms. In master form i want to use it in the following way:
    MasterForm-onLoad(){
    check for form data Object in the session/request
    if the data exists
    populate the form fields (by getter methods of form data object)
    Show the input from detail form
    otherwise
    show empty form
    Now the problem is that it throws null pointer exception if the form data does not exist and i try to access it within an IF statement.
    I beleive this is coz the JSP code will be executed on the server before the html page is loaded. Can any one please tell me how to solve this problem.
    Thanks and Best Regards
    Gul

    thats exactly what i m doing but the session variable is not a simple variable or objct, its a serializable object with getters and setters which i will call to retrieve its values. its like this
    FormBean formData=(FormBean) session.getAttribute("formData");
    now in javaScript i will have to check if the formData is null and than perform the getters or setters.
    <script>
    function getValues(){
    if("<%formData%>"!="null"){
    form1.SID.value="<%=formData.getIDVal()%>"
    </script>
    thats what i was trying to do but the problem is all jsp code will be executed before the page is loaded so it will try to execute inside of the if statement even when the object is null so NullPointerException.
    The only way i have got it working so far is to retrieve all the values in the JSP scriptlet, and than use the individual variables as u also mentioned.... SO Far i havnt been successful in calling getter methods in JavaScript. you think it can be done?
    Thanks for the reply
    GUL

  • I have Itunes Match and want to know how to put music back into the Cloud after I have downloaded it and finished listening to it. I need the space on my Iphone/Ipad back after I'm finished listening to the music I wanted.

    I have Itunes Match and want to know how to put music I have downloaded from the Cloud back in the Cloud for storage after listening to it.

    TThis answered my question - thanks very much

  • Populating value into the gauge

    Hi,
    I have a chart(bar) and a gauge in my iview. If user clicks on the graph at various points then the corresponding value is displayed in the gauge.
    Is it possible to do this when the user moves his mouse pointer(without clicking) over various values in the graph?
    and
    is it possible to customize the colours displayed in the gauge?

    without clicking, it's not possible to trigger an action to refresh graphs or any other data on an iView.
    as for color customization, enable flex control styling in portal themes (in vc , go to  tools->options-->compiler tab). navigate to portal -->sys admin -->portal display -->theme editor. chck Under VC group if the gauge ui element is included and wat color properties u can change, if any.

  • How to load this value into the master data display attribute

    Hi ,
    Please share me the knowldege how to load this kind of data into master data display attribtes ..
    Raj + Ravi Ltd (PCG: 13592)
    While loading this data ,i got the error message stating that '+' should not be part of the attributes and () should not be part of the attribute ..but i need all the information as it is available in the example data .
    Do i need to maintain RSKC Settings else some other things required ..
    Please guide me ..
    Regards,
    Raj

    HI,
    Maintain these symbols in RSKC and try to reload the data....

  • How to display(binding) values in the table from more than one node?

    Hi,
    I have two nodes (TRIPS & AMOUNTS)in the context. How to bind these values into the table control?
    When i bind second one, first one is getting replaced.

    Hi Mog,
    Of course it is possible to create a table from attributes of more than one node, and in some cases this is still necessary, but you have to do this the hard (manual) way.
    If you have a table control, have a look at the properties and the elements belonging to it.
    First of all, there is the property "dataSource", which binds to a multiple node (let's name it TableRootNode). This means that for each element of THIS node, one row is created. In each row the data of exactly one element of this TableRootNode is displayed.
    Then you have columns in this table. Inside of the columns there is a header and an editor. The editor is the interesting part.
    Normally the primary property of this editor is bound to an attribute of the TableRootNode. Then everything works as expected. If it binds to an attribute of a subnode (SUB) of TableRootNode, then in row i the data of the subnode of the i-th element of TableRootNode is displayed. There is no need for SUB to be a multiple node, but it must not be a singleton.
    If you bind a property of the editor to an attribute, which does not lie in the subtree of TableRootNode, then you will see the same value in each row.
    Now it depends on the structure of your context. Take the node, which is relevant for the change in each row (I assume it is TRIPS) and bind the table to the node as you are used to. Then for each additional column, you have to create a new column in the tree, create a new header element with a title and a new editor (e.g. textview or inputfield) and then bind the right property of the editor to the corresponding attribute in node AMOUNTS).
    If these 2 nodes do not have parent-child-relationship, the tip to create a new node, which consists of the attributes of both nodes is the only solution.
    Ciao, Regina

  • How to put the SQL-statement returned value into the field (as a default)

    Hi,
    I am using Developer/2000 (Forms Designer) under windows 98.
    Please tell me how to put the SQL-statement value (as a default value) into the field before enter-query mode. Noted that I have tried the following ways but still some problems:-
    1) Place the SQL-statement into PRE_QUERY trigger in the form/block level.
    There is a message box which ask 'Do you want to save the changes?'.
    2) Place the SQL-statement before execute enter_query. There is still a
    message box which ask 'Do you want to save the changes?'.
    Any hints? Thanks. Urgent.

    solved it!
    1) Suppress DEFAULT save message
    if form_failure then
    raise form_trigger_failure;
    end if;
    2) Place the default value before enter-query.
    Ref: Title='Default value in query field in ENTER_QUERY mode' in designer forum by CVZ
    form level trigger
    ============
    WHEN-NEW-ITEM-INSTANCE
    =======================
    if :system.mode = 'ENTER-QUERY' then
    :block.item := 'default waarde';
    end if;
    3) Suppress the changes whenever leaving the default field.
    if :block.item is null then
    -- assign statement
    end if;

  • How do I delete old email addresses from the pop up list that comes up when I put a letter into the "To" box. These addresses are not in my address book.

    How do I delete old email addresses from the pop-up list that comes up when I put a letter into the "To" box? They are not in my Address Book.  Wrong addresses get in the way and I sometimes select the wrong one.

    Edit the list the comes up when you go to the Window menu and select "Previous Recipients".
    charlie

  • How come F10 does not put my clip into the timeline ?

    How come F10 does not put my clip into the timeline ?
    When I pressed F10, the sound icon appears instead.
    Am I missing out something ?
    Thanks

    skalicki` wrote:
    Technically, to make the function keys work you don't need to change the second box to dash. I don't know why I gave that advice, but it isn't necessary. I guess I said that simply because that's what I have it set to.
    The reason there are two boxes is so that you can set Exposé to using both the function keys and the mouse. For example, if I have +All Windows+ set to F9 and Secondary Mouse Button, then it will show all open windows if I click F9 or right-click. That is why you actually don't need to have the second boxes for any of these set to dashes. You could set them to your mouse buttons, or if you wanted you could set the first box of any of these to any function key, as long as it isn't set to the same one as the key you want to use for your shortcuts within FCE.
    I hope this made sense, I realize that I might not have explained it very clearly.
    Message was edited by: skalicki`
    Thanks skalicki, I think I got it. You've been of great help !!

  • How can I put my bookmarks into the sequence I want, alphabetical or otherwise?

    How can I put my bookmarks into the sequence I want, alphabetical or otherwise?

    http://kb.mozillazine.org/Sorting_bookmarks_alphabetically <br />
    http://kb.mozillazine.org/Sorting_and_rearranging_bookmarks_-_Firefox

  • How can we include the property value into the News RSS?

    We have defined object property u201CDepartmentu201D that is used in News XML creating form. How can we include the property value into the News RSS (set value of the particular RSS XML tag)?

    We have solved the issue with NWDS

  • I have a macbook.  Whenever I put a disk into the disk drives it keeps ejecting the disk after 2 secs.  How can I fix this?  Thanks

    have a macbook.  Whenever I put a disk into the disk drives it keeps ejecting the disk after 2 secs.  How can I fix this?  Thanks

    I am also having a similar issue. I used Adobe Lightroom and my whole display goes black. Even my laptop screen and the lights on the keyboard go black. I can still hear the fan running, so I assume it is just the display. This is my first Mac and I have had nothing but issues. I think I am going back to Windows after this.

  • SQL Server 2012 Management Studio: Creating a Database and a dbo Table. Inserting VALUES into the table. How to insert 8 Values for future use in XQuery?

    Hi all,
    In my SQL Server 2012 Management Studio (SSMS2012), I tried to create a Database (MacLochainnsDB) and a dbo Table (marvel). then I wanted insert 8 VALUES into the Table by using the following code:
    USE master
    IF EXISTS
    (SELECT 1
    FROM sys.databases
    WHERE name = 'MacLochlainnsDB')
    DROP DATABASE MacLochlainnsDB
    GO
    CREATE DATABASE MacLochlainnsDB
    GO
    CREATE TABLE [dbo].[marvel] (
    [avenger_name] [char] (30) NULL)
    INSERT INTO marvel
    (avenger_name)
    VALUES
    ('Hulk', 1),
    ('Iron Man', 2),
    ('Black Widow', 3),
    ('Thor', 4),
    ('Captain America', 5),
    ('Hawkeye', 6),
    ('Winter Soldier', 7),
    ('Iron Patriot', 8)
    I got the following error Message:
    Msg 110, Level 15, State 1, Line 5
    There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
    How can I correct this problem?
    Please kindly help and advise.
    Thanks in advance,
    Scott Chang
    P. S.
    The reason I tried to create the Database, dbo Table, and then to insert the VALUES is to learn the following thing:
    You can query the entire node tree with the following xquery statement because it looks for the occurrence of any node with the /* search string:
    DECLARE @x xml;
    SET @x = N'<marvel>
    <avenger_name>Captain America</avenger_name>
    </marvel>';
    SELECT @x.query('/*');
    You can query the avenger_name elements from the marvel_xml table with the following syntax:
    SELECT xml_table.query('/marvel/avenger_name')
    FROM marvel_xml;
    It returns the following set of avenger_name elements:
    <avenger_name>Hulk</avenger_name>
    <avenger_name>Iron Man</avenger_name>
    <avenger_name>Black Widow</avenger_name>
    <avenger_name>Thor</avenger_name>
    <avenger_name>Captain America</avenger_name>
    <avenger_name>Hawkeye</avenger_name>
    <avenger_name>Winter Soldier</avenger_name>
    <avenger_name>Iron Patriot</avenger_name>
    You can query the fourth avenger_name element from the marvel_xml table with the following xquery statement:
    SELECT xml_table.query('/marvel[4]/avenger_name')
    FROM marvel_xml;
    It returns the following avenger_name element:
    <avenger_name>Thor</avenger_name>

    Hi Scott,
    The master database records all the system-level information for a SQL Server system, so best practise would be not to create any user-defined
    object within it.
    To change your default database(master by default) of your login to another, follow the next steps so that next time when connected you don't have to use "USE dbname" to switch database.
    Open SQL Server Management Studio
    --> Go to Object explorer(the left panel by default layout)
    --> Extend "Security"
    --> Extend "Logins"
    --> Right click on your login, click "propertites"
    --> Choose the "Default database" at the bottom of the pop-up window.
    --or simply by T-SQL
    Exec sp_defaultdb @loginame='yourLogin', @defdb='youDB'
    Regarding your question, you can reference the below.
    SELECT * FROM master.sys.all_objects where name ='Marvel'
    --OR
    SELECT OBJECT_ID('master.dbo.Marvel') --if non empty result returns, the object exists
    --usually the OBJECT_ID is used if a if statement as below
    IF OBJECT_ID('master.dbo.Marvel') IS NOT NULL
    PRINT ('TABLE EXISTS') --Or some other logic
    What is the sys.all_objects? See
    here.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • To allow me put a value into field without coming out the tcode.

    Hi Friends,
    My requirement is when a value is entered into a field leaving the other field empty should display a error  message
    I'm making use of the below statement to display the error message
    message S000(01) display like 'E' raising error_with_message.
    But the thing is ,when trying to save it after entering value into a field leaving the other empty, its displaying the error message which i have maintianed.till here its well and good.But from here I can only come out of the tcode without allowing me to enter the value into the other field.
    want a message to be displayed on the status bar and allow me to put the value into the remaining field
    without coming out from the screen..
    Please help..

    Hi laxman,
    Are you saying like this..
    message S000(01) dispaly like 's' raising error_with_message.
          set screen 100.
          leave screen.
    The Req is "If I enter a value in field leaving the other field empty in tcode XXXX..its should display a message that this particular field is mandatory and allow me to put the value into the other field "
    I'm able to display a message when the second field is left empty..
    In the message dialog (where the message gets displayed), exit option is there.so i'm coming out of the tcode.But it should give me message and allow me to put the value in the screen without coming out of it.

Maybe you are looking for

  • Automatic Batch determination at time of Goods receipt for production order

    Hi SAP experts,                          Greetings to you all. I wish to ask a query that how batch is determined automatically at the time of goods receipt for production order .                          I have done the following settings: 1.Specifi

  • German Special Characters in XSTRING to STRING conversion

    Hi Experts, I have a CSV file (created from a Windows Excel file) with German Special Characters (e.g. 'ä', 'Ä') and I am trying to read this into ABAP internal tables. By using the THTMLB tag 'thtmlb:fileUpload' I get an XSTRING and I am trying to c

  • How to get audio frequency

    hello This is sudhakar working as a programmer on Java now we are implementing audio recording and playing.. but here we are facing one problem.. that is . how to get the audio frequency...that is pitch but it variate the pitch which during the play.

  • Sapxpg - connection to partner broken (SLD - SolMan)

    Hello, I've problem wtih my RFC-Connection SAPXPG_DBDEST_<host>. To collect data for dba-cockpit, we need a RFC-Connection between SolMan and SLD: RFC Destination     SAPXPG_DBDEST_HBMESA5A Connection Type  T  TCP/IP Connection                 Descri

  • Make iDVD Selection Menu into Main Menu

    Please excuse me if this is a simple-minded question, but I have not found a solution yet. I have a .mov file that I want to burn to DVD. It has 4 chapters - okay, okay, so they're cartoons; who doesn't want some favorite cartoons around? Anyway, the