Text and variables

Hello Forums,
Just for some fun, i'm trying to make something somewhat
similar to a stat calculator. I'm testing out my design using the
base for a MMORPG game; where as the character level increases they
gain base attributes but also additional attribute points that they
can spend on those attributes. So for example;
A character has, health, attack and defence, at level 1 those
stats are low, at level 2, those stats increase with a predefined
build, however the character also gains 4 additional points which
they can use to raise a specific stat if they wanted to.
So basically saying, at level 100 you would have 400
additional points ontop of your predefined build, I have an 'Input
Text Box' where you obviously type in your level, then I am using a
'Dynamic Text Box' which is to display how many additional points
you will have at what level.
My question is, how can I set up a variable (through the
'Input Text Box') where whatever number you were to type in, it
would be multiplied by another number and then displayed (from the
'Dynamic Text Box')
Thanks in advanced to anyone who can understand and
answer.

You can use the default (StringBuilder) like this
String result = "My Text" + otherText;
Or you can use String.format
String result = String.format ("My text is this %1$s, the other value is this %2$s", otherText, text3);

Similar Messages

  • Concatenate text and property of dimension in script logic

    hello experts,
    how to concatenate text and property of dimension in script logic?
    as example:
    dimension : interco
    property    : mgmtallocdefcc
    *WHEN TIME.YEAR
    *IS %YEAR_VAR%
    *REC(EXPRESSION=%VALUE%,ACCOUNT=12345,ENTITY="I_" [INTERCO],MGMTALLOCDEFCC)
    *NEXT
    then it will read all as text: I_[INTERCO].MGMTALLOCDEFCC
    for example the value of property mgmtallocdefcc in interco dimension (INTERCO.MGMTALLOCDEFCC) is ABCDE.
    what i expect is :I_ABCDE
    thanks!

    Hi Yoki,
    Concatenation is only possible between text and variables %VAR% or $VAR$.
    Like ENTITY=I_%SOMEVAR%
    But in your case instead of concatenate you have to use other property like TARGETENTITY having valid ENTITY members:
    ENTITY=INTERCO.TARGETENTITY
    B.R. Vadim

  • Display key and text in variable selection screen.

    Hi:
    I have a variable in the Var.selection screen. and I cannot have the text displaying. Only the key is coming.
    - I have checked "Provider-Specific Properties" in RSA1 and is ok. and display attributes in Query Designer as well.
    Infio: The Characteristic is used in the same query as a Free Char. and there is displaying Key+Text correctly...
    any idea in what else to check.?
    Regards.

    Hi,
    Do you mean that the value help of that variable is not showing the Text values in the selection screen.It shows only the values in "Key"
    If this is the case,then invoke the value help of that variable->Click "Settings"->"General Display" tab->Select "Default(Text)" and click OK.The values will be listed in "Text" rather than "Key"
    Rgds,
    Murali

  • Key and text for variable

    Dear ALL,
    I m having one variable for that i need key and text in bex analyzer.
    how to enable the key and text for a variable.
    pls asap
    regards,
    Jenish

    Hi jenish kumar ,
    if i under stan your requirement correctly,  need to have both text and key values for variables with F4 help.
    you need to chnage the properties of that infoobject at infoobjects level or at infoprovider level,
    this is at infoprovider level
    in RSA1-> go to change mode of infoprovider (Multiprovider/ cube) on which Query is build) then Expand  Charecteristc Dimension -> select infoobject -> right -> select provider-specific properties -> select Display '0 Key and Text' . Activate infoprovider and Run Query and check the Selection screen.
    hope this helps
    Regards
    Daya Sagar

  • Conditionalized text and abutting variables

    The content uses two variables: "
    institution" and "
    campus."
    All text regarding campuses needs to be conditionalized.
    For the most part, I've had complete success with
    conditionalizing text that includes variable(s). The problem comes
    in when there is another variable before or after the text that I
    select for the condition. For example, if I try to conditionalize "
    /campus" in the phrase "institution/campus" the condition
    also grabs the
    institution variable. Or, if the phrase is "feature is
    available for institution and campuses." when I conditionalize "
    and campuses" the condition also grabs "institution."
    The grab doesn't occur when the condition is initially
    entered. In the topic content, the change occurs when I switch
    between wysiwyg and truecode. When the condition is set in expanded
    text, it looks fine. Close the expanded text and then reopen it,
    and the condition has grabbed the neighboring variable.
    I'm using Robohelp HTML 6.
    For now, I'm rewriting the text. But is there a solution?
    Thank you.

    First try getting it right in code view, then save from
    there, then open another topic. Reopen the topic and see if it
    still works. If it does (unlikely) make some other edit in WYSIWYG.
    My guess is the problem will still be there. If it is. Create
    a new project with one topic with this problem in it. Zip it up and
    send it to me via my site. In the email, include a link to this
    topic.
    In the topic have a paragraph with the problem and below that
    repeat the paragraphs with text showing the results you want to
    achieve.
    I'll verify I get the same result and try to find a
    workaround.

  • Is variable offsets can be used for characteristics, text and formulas?

    hi all,
    can anyone let me know whether variable offsets can be used for characteristics, text and formulas.
    if so cany one send me examples of using offsets to my email id [email protected]
    regds
    hari

    You use offsets on dates (0CALMONTH, 0FISCYEAR, 0DAT and so on) and of course the corresponding texts.
    If you have 0CALMONTH in your query and you want to do the same thing not only for the current month but for the past twelve months, they you just minus 1, 2....11,12 for each selections, and at the same time you can create text variable for the description of each month.
    thanks.
    Wond

  • Text Manipulation and Variable Data in Photoshop

    Our company is getting into variable data printing. There are a few ways to get variable data into photos. I've played with a program called Direct Smile. Its text manipulation tools are rather good. It lays a grid over the text and you can select each grid intersection and pull and push to get the text into the shape you want.
    There are other programs that work through InDesign and Photoshop, using scripts to insert the variable data into the Photoshop text layer.
    When I tried to warp the text in Photoshop I found that beyond a certain point, you have to flatten the text, at which point, it's no longer a text layer that can accept variable data from a database.
    Is there anything like the grid tool in Direct Smile in Photoshop?

    I’m unfamiliar with Direct Smile.
    But for text-manipulation in Photoshop You might want to consider converting the Text to a Smart Object which can then be warped or treated with the Distort-Filter Displace, all the while maintaining the text-layer within the SO and thusly its editability.
    And if I remember correctly one can even make Liquify applicable as a Smart Filter, but one would have to save the Mesh separately … possibly too problematic a solution.
    Or You could go via Illustrator which offers Envelope Distort (which provides a grid-based »plasticity«) and then embed the result thereof as a SO in the Photoshop-file. Unfortunately Illustrator doesn’t Script as comfortably as Photoshop in my limited experience and Envelope Distort my be unscriptable altogether.
    But if I understand correctly You will want to automate all that stuff, so maybe You should check out the respective Scripting-Fora.

  • Issue with visibiliy of dynamic text and hyperlinks

    Hi everyone,
    It's been a while since I've build a Flash site and a I'm finding a out a lot has changed.
    I'm building a simple site with some pictures, text and the 5 last posts from Twitter.
    This last one is not working out that well.
    First of all:
    The outputed data from Twitter is displayed into a dynamic text field which is working fine when I test the movie in Flash, but as soon as I upload it to my server the text is not visible.
    Flash already told me that I need to enclose my font in the movie (that's new for me) and I did that using the button in the properties windows.
    But it still won't work.
    I recreated the Twitter reader in a empty document to isolate it from my website during the troubleshooting.
    Here's the AS I'm using:
    var loadXML:XML = new XML();
        loadXML.ignoreWhite = true;
        loadXML.onLoad = processXML;
        loadXML.load("twitter.php"); //used when swf in placed on server
        loadXML.load("");
        function processXML(loaded:Boolean)
            if(loaded)
                var node = this.firstChild;
                tweet_1.text = node.childNodes[0].childNodes[2].firstChild;
                tweet_2.text = node.childNodes[1].childNodes[2].firstChild;
                tweet_3.text = node.childNodes[2].childNodes[2].firstChild;
                tweet_4.text = node.childNodes[3].childNodes[2].firstChild;
                var follower_count = node.childNodes[9].childNodes[11].childNodes[9].firstChild;// Creates variable
                trace(follower_count); //loads variable into output
                follower_count_txt.text = follower_count;// show follower count in text box
            else
                error_txt.text = "Error loading XML file";
                        for (i=0; i<follower_count; i++)
                            _root.attachMovie("tweep_mc", "tweep"+i+"_mc", i);
                            _root["tweep"+i+"_mc"]._x = 150 + random(500);
                            _root["tweep"+i+"_mc"]._y = 150 + random(500);
                            trace(i);
                        trace(i);
        follow_btn.onRelease = function()
            getURL("");
    facebook_btn.onRelease = function()
            getURL("");
    stop();
    Right here you can see the output of it on the server.
    The second issue:
    The items posted to Twitter will simply always contain pictures which Twitter posts as hyperlinks.
    Is there a way to make those hyperlinks function in my dynamic text field?
    Hope you guys can help me out!
    Thanks in advance!!
    Karim

    Ok.. After some resarch I find out the guy who created this made use of the Twitter API.. Since I don't know how to do that and
    can't find straight answers that's not an option for me...
    Althought...
    What I forgot to mention in the first post:
    This is what the beginning of actionscript is actually looking like right now and why it is working offline:
    var loadXML:XML = new XML();
        loadXML.ignoreWhite = true;
        loadXML.onLoad = processXML;
        loadXML.load("http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=karimbizid2");
    I'm getting the data direct from the Twitter server.
    This procedure does'nt neceserly need a PHP file to store the XML, right?
    I'm guessing it's just a visual issue why the text isn't showing.
    Karim

  • How to put the column name and variable value in the alert message.

    Dear,
    how can i put the column name and variable value in the alert message text. i want to display an alert which tell the user about the empty textboxes. that these textboxes must be filled.
    Regards:
    Muhammad Nadeem
    CHIMERA PVT. LTD.
    LAHORE
    [email protected]

    Hello,
    The name of the item that fires the current trigger is stored in the :SYSTEM.TRIGGER_ITEM system variable.
    The value contained in this item can be retrived with the Name_In() built-in
    value := Name_In( 'SYSTEM.TRIGGER_ITEM') ;
    LC$Msg := 'The item ' || :SYSTEM.TRIGGER_ITEM || ' must be entered' ;
    Set_Alert_Property('my_alert_box', ALERT_MESSAGE_TEXT, LC$Msg ) ;
    Ok := Show_Alert( 'my_alert_box' ) ;
    ...Francois

  • Box containing text and image (fit frame to contents).

    Hi all,
    The best way I can describe what I am trying to achieve is to show you a picture.
    So essentially, I'm looking to create a grey box, containing some text with an image floating to the right hand side. I want about 2mm space (padding) inside the grey box so no content goes right to the edge and I want the text to wrap around the image. The bit I'm finding tricky is when I go to use the 'Fit frame to content' option. I'm trying to remove the space indicated by the red arrows but if I anchor the image inside the text frame, the grey box shrinks to the height of the text and the image overflows.
    This would be incredibly simple to achieve on the web, am I doing something wrong?
    Any help/direction would be greatly appreciated.

    Sorry, been out for an hour.
    I understood that you want to have some variable height text frame (the gray box), and that this box should reduce in height to fit the text contained therein, but not  less than necessary for the bottom to be 2mm below the bottom edge of the variable height image (which I'm presuming is anchored to the first line of text in the frame) in a case where there is not sufficient text for fit frame to content to avoide making the frame shorter than the bottom of the image.
    I believe this could be scripted, but that will still require you to run the script. You should ask over in InDesign Scripting
    As far as a container that holds both text and image frames, yes, but only if you "paste into" a new frame after creating the two separately and grouping, which probably is not what you have in mind.

  • Display Key & Text In Variable Screen

    Hi All,
    I am having one master data Location having Attribute and Text data loaded.
    I am using the same Location as a characteristics in my DSO and then in Query .
    Now, i have create one variable on Location. When i am executing the query , and click on Location Help. It will show only Text values. I want to have Location Key as along with Text in the variable selection screen.
    Please suggest.
    Regards,
    Macwan James.

    Hi James,
    for infoobject Location you can swith to both key and Text at variable screen.
    please do this setting.
    RSA1 -> select DSO  change mode -> go to the infoobject Location right click select  "Provider-specific properties"
    Display " 0 Key and text" select this and activate DSO.
    please check at the selection screen.
    Best Regards.

  • Text and/or repeating frames run off page ...

    Please help. It's very hard to believe that Oracle Reports 6i does not have a way of keeping text and/or frames from running off the physical page. My frames and text boxes have thier vertical size set to variable, and I have set page protect to yes, although this does not seems to help.
    Will setting the page length to the correct number of lines in between the margins help, there must be a way of keeping this from happening.....please help!

    hello,
    by setting the frame elasticity to variable, you allow the frames to shring and expand regardless of the page-size. to restrict it to a specific page size, the out-most frame must represent the boundries and must be set to fixed.
    regards,
    the oracle reports team

  • Using the text and not the value of a filed

    Hi there,
    I'm programming a pdf form using life cycle, I'm using the following script in a "SEND TO" button in order to email an XML file with the data extracted from the form:
    var emailAddress = F.P1.Line.rawValue;
    var veicle = F.P1.Vehicle.rawValue;
    var shipper = F.P1.Shipper.rawValue;
    var date = F.P1.Date.rawValue;
    event.target.submitForm({cURL:"mailto:"+emailAddress+"?subject=Booking request from "+shipper+" date:"+date+" &body=Dear Sirs,Please find attached the completed PDF booking form for the following "+veicle+".",cSubmitAs:"XML",cCharset:"utf-8"});
    The problem is that I would like to use in a variable the text and not the value of the F.P1.Line.raw field.
    Thanks in advance

    Hi,
    This is not the appropriate forum to post this type of question. Please post all designer related queries in LiveCYcle Designer Forum to receive better response.
    From you query I understand you have a dropdown box with name as "Line". And you want to the "text" part of the selected item and not the "value" part. If it is so then do the following -
    1. Write the below code in onCHange event of your dropdown box.
    var ddValue = this.boundItem(xfa.event.newText);
    var nodeList = this.resolveNode("#items").nodes;
    var ddText = null;
    for (var i = 0; i < nodeList.length; i++)
    if (this.boundItem(nodeList.item(i).value) == ddValue)
    ddText = nodeList.item(i).value;
    break;
    global.selectedtxt = ddText;
    In the above code I am basically getting the "text" part of the item selected and then I am storing it in a global variable.
    2.
    Write the below code on click event of your button -
    var emailAddress = global.selectedtxt;
    Hope this helps.
    Thanks,
    Shivajiv.

  • Taking data from a edit text and placing it in a matrix

    Hi all, this is most probably a silly question and simple as pie for everyone on this site, but i just can't get it to work .
    Im trying to take data from a edit text and then place it into the matrix.the matrix has been added to the form already. my code looks like this
    dataSource = oForm.DataSources.UserDataSources.Add("MyData", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20)
    oColumn = oColumns.Item("ItemC")
    oColumn.DataBind.SetBound(True, "", "MyData")
    dataSourceED = oEdit.DataSources.UserDataSources.Add("MyDataED", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20)
    oEdit.DataBind.SetBound(True, "", "MydataED")
    dataSource.Value = dataSourceED.Value.ToString(oEdit)
    oMatrix.AddRow()
    Please can someone show me how it should be actualy done because i think the above is totaly wrong.

    I thought it was wrong Alexey Grebennikov because it wasn't doing anything.  I original said
    If (FormUID = "UidFrm") Then
    If (pVal.Before_Action = False) Then
    If (pVal.ItemUID = "Add") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) Then
    AddToMatrix()
    end if
    end if
    end if
    then in AddMatrix() it had the code listed before,it was in a try block but i was not diplsying the error in the catch part,my bad/fault   but i've added it to a try block with it displaying the error in the catch block and i'm getting the error
    "Object Variable or block variable not set" when it gets to the line
    dataSourceED = oEdit.DataSources.UserDataSources.Add("MyDataED", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20)
    any ideas what this error means, if i know that i think it will then work.
    Thank you to both of you Auzillaud Antoine and Alexey Grebennikov for helping. Auzillaud Antoine i tried loadfromdatasource and the other code but it obviously picks up the error before getting to the code you supplied. If i can figure out the error i'm sure it will all work.
    So please, any ideas why i get the error
    "Object Variable or block variable not set"

  • Displaying Medium Text in Variable screen (WAD)

    Hello Experts,
    When I run one of my reports in BEx, the input help for an infoobject shows key, Short Description and Medium Description. But the same report when I run in WEB it does not show the Medium Description but only the key and Short Description is getting displayed. I have selected short and medium description for that infoobject at all the levels.
    Could you please tell me how to show also the Medium Description along with in WEB input help.
    Thanks a lot.
    Rajat

    Arun,
    I am using BW 3.0B. The default display is specified in BW BEx Tabstrip in IO Definition (in RSA1) is Medium Text.
    My problem is: When I run the report on Web and select the value for characteristic variable of this infoobject (by clicking on the browse link next to text box) , I see Key and Short Text in the list. Whereas my Client requirement is that he wants to see Key and Medium Length Text in the Variable option list.
    On BEx Analyzer, i can see Key, Short Text and Medium Text in the Variable slection screen. But it is not giving the same result on Web.
    I have checked all the properties in web template.. like data provider, web template, result table properies.. I also tried to change BEx description property to Medium text as well. But it is not working.

Maybe you are looking for

  • Keeping or changing...that is the question!

    I have a macbookpro 13" early 2011 should i upgrade my Ram and get an SSD or buy the new macbookair???

  • Expanding and Moving of a SkinnableContainer

    Hello! I am using Flex 4 and a SkinnableContainer. I add the container with this.addElement(theSkinnableContainer); to my screen. My problem is, that I willnot only put the Container onto the screen, I want, that you can see how the container will be

  • Material master for Rods and Plates.

    Hi all!    I need to know the answer for two critical questions in SAP-MM. I have asked this question some time before but have'nt got any replies. Here again i throw the same. 1. How to maintain material master for Rods of various diameter and lengt

  • Why did remaining storage capacity suddenly change from 3.5 GB to 0.5 G???

    When I wanted to synchronise my iPhone 3G yesterday I suddenly recognised that the storage capacity had sunk from 3.5 GB to 0.5 GB. The yellow bar suddenly had become longer and indicated 3 GB more "OTHERS" (other programs) than before. I didn´t have

  • Different Mac Mini noise issue

    I have read the recent post on noise. My situation is a little different. My Mac Mini is about 6 months old and only started doing this 2-3 days ago. It is emitting a high pitched whine (a pretty loud one) and it appears to be in connection with the