How to script creating variables based on input

I am looking to do something that I am sure is possible but at a loss on how to do it. Maybe someone can assist. What I am looking to do is have a question that is asked, the input will be a number, what I want to do with that number is have it stored into
a variable called "$variableX" where the X is the number someone enters.
For example:
Question:  Type a number from 10-20
The user types 15, then the script outputs the Variable $Variable15, then when asked to enter a another number and they enter 19, then another variable is created called $Variable19.
Hope this makes sense.   I was thinking of writing a bunch of If statements but I don't want to enter 10-20 of them, if one smaller script can do them all.
Thanks,

Yes, they will be asked "Are you adding a new disk to the server?", if the answer is yes then it will then ask for the disk number.  After they do that it will then say "Is there another disk to add?"  If so then it
will run it again.  If no, then it will stop.
You can wrap what I've posted above in a do loop to accomplish this.
http://ss64.com/ps/do.html
Don't retire TechNet! -
(Don't give up yet - 13,225+ strong and growing)

Similar Messages

  • How to bind data from script created variable to embed element of XML schema (xsd) in "Data View"

    Hi, i have got another problem with livecycle designer scripting.
    I have got script line which is defining of string variable:
    var aaa = "this is my string";
    and i have got embed XML schema like this (it`s only short part of whole file):
    ... xs:element name="bbb" type="xs:string"/ ...
    After saving data to XML i would like to get "this is my string" as a value of my "bbb" XML element.
    To save this data i`m using submit button which is connect with submit.php file on my server.
    How to connect script created variable and embed XML schema element which is present on my "Data View" tab.
    Please help me a bit becouse i don`t know even where to search answer of it...
    Of course i know possibilities to create fake unvisible text field object and bind it with 'bbb' and than put "this.rawValue = aaa" to connect those two variables but i think that is not a good idea to solve it in that way. It`s too primitive

    i solve it, i should write this:
    xfa.datasets.data.bbb.value = aaa;

  • How do I create variables and store them?

    How do I create variables and store them?

    As someone already said, we need to know a little more about what you want to do with these variables, but in general, APEX Items are probably what you want. You can create APEX Items at the Application or Page level. Once you set the value of an item, you can reference it anywhere else in the application. So, if you have an item on page 1 called P1_ENAME, you can reference it on page 32 using bind variable syntax :P1_ENAME. If you just want to store but not display some information, you can use either a hidden page item or an Application Level item. Take a look at the 2 Day Developers Guide for more info.
    Tyler

  • Populate a variable based on input (Customer Request Ship date)

    Hi Gurus,
    I have a requirement to code on a custom variables.
    Created two Customer Exit Variables:  "ZCRD" AND "ZFYPRD."
    Variable one - "ZCRD" - customer requested ship date.  ( input) variable.
    Populate a variable - "ZFYPRD" based on users input - "ZCRD."
    Please provide me if function module exist / how to code a new FM and code to populate the value on variable ZYPRD.
    For Instance:
    if user's input is "ZCRD = 05/30/08".
    Populate the value in the variable (custom) "zfyprd" = 005/2008.
    How would I code in ABAP If this is the condition.
    Please help.
    Thanks in advance.
    BW

    Hi Ramesh,
    Thank you for the response.  Your input is valuable.  For this requirement its a BPS Planning Layout.
    Do I need a function module to work this code?  The (key date) customer requested ship date (variable) is an input from users through planning area.  If function module requires please give me the code for the function module.
    Users enter = customer requested ship date.
    Variable for this fiscal yr/period should populate/ convert it to the period.
    I used the function module convert it to period.  But which function module is to use to connect it to the variable for customer requested ship date in bps?
    I created a variable (customer exit) for period in the query.  I referred the code given in the document to convert it to period from key date.  But while testing the variable customer requested ship date is coming as initial.  what is it that I am missing here?  Please help
    Thanks in advance,

  • How can I create VI's with inputs which will execute immediately when updated?

    I am using LabView to control stepper motors. I would like to create a VI with a front panel which has 4 directional arrows, 2 per motor. My goal is to be able to run the VI and then press a button to move the motor.
    I have created separate VI for each funcition of the motors - a vi to set the holding current, one to set the moving current, another to move up by a certain amount, and so on. These vi's work and I can move and adjust the motors, but only by running separate VI.
    How can i combine them into one VI and have them execute at the press of a button or change of a property? An example would be to set a new holding current, and have the holding current vi execute immediately and send the command to the motor. Then keep on pressing the directional buttons without having to hit "run" on another vi.
    Thank you very much
    Solved!
    Go to Solution.

    The event structure will allow you to handle user input and execute when controls are used.  A "value change" event is what you're looking for.
    =============
    XP SP2, LV 8.2
    CLAD

  • How do we create variable for hierarchy node selection

    hello all,
    I have to create a variable as to where the user ca input the node of hierarchy in his selection at the start. Do we have to create a new variable ?
    I have the hierarchy loaded for that infoobject. I tried creating a new variable but the when I select from drop down as varaibles and name of the hierarchy no variables shows up.
    Thanks

    Hi Raj,
    Please see this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/83/096d399bd2046fe10000000a114084/content.htm
    It has complete details.
    Hope this helps...

  • How to script text field based on checkbox selection

    I've written a script to format specific text boxes based on what checkbox is chosen. However, I'm not sure what I need to script in order to CLEAR the text field once the checkbox is unchecked. As it stands now if the checkbox is selected it formats the text field with the necessary information, but if it's unchecked the information stays in the box. I'd like to be something like 'if all boxes are Off then display 0.00.' I've included the current script for reference
    var one = this.getField("Emp 500");
    var two = this.getField ("Emp+C500");
    var three = this.getField("Emp+S500");
    var four = this.getField("Fam500");
    var five = this.getField("NC500");
    var six = this.getField("Medical");
    if (one.value == 'Yes') {six.value='70.70'}        
    else if (two.value ==
    'Yes') {six.value='127.20'}
    else if (three.value == 'Yes') {six.value='141.32'}
    else if (four.value == 'Yes') {six.value='198.00'}
    else if (five.value == 'Yes') {six.value='0'}
    var one = this.getField("Emp 1500");
    var two = this.getField ("Emp+C1500");
    var three = this.getField("Emp+S1500");
    var four = this.getField("Fam1500");
    var five = this.getField("NC1500");
    var six = this.getField("Medical");
    if (one.value == 'Yes') {six.value='61.47'}
    else if (two.value == 'Yes') {six.value='110.49'}
    else if (three.value == 'Yes') {six.value='141.32'}
    else if (four.value == 'Yes') {six.value='123.04'}
    else if (five.value == 'Yes') {six.value='0.00'}

    Hi Gayathri,
    Gayathri Venugopal wrote:
    Hi,
    I have two text items. Need to create dynamic action for the following,
    1. Order_type - Drop down values having CONSUMER & WHOLESALE.
    2. Order_number- Text field
    Order number should be disabled and only on selection of order type ,order number should be enabled.
    Can someone please help me on this?
    Create two dynamic action
    1. Make it order number item disable on page load.
       Event : Page Load
       Action : Disable
       Fire When event result is : True
       Selection Type : Item
       Item : Your order number item
    2 . enable and disable order number on selection of order type(assuming when order type is null it is disable otherwise it is enable)
        Event : Change
        Selection type : item
        Item : your order type item
        condition : is not null
    True Action
        Action : Enable
        Fire When event result is : True
        Fire on page load : True
        Selection Type : Item
        Item : Your order number item
    False Action
        Action : Disable
        Fire When event result is : False
        Fire on page load : True
        Selection Type : Item
        Item : Your order number item
    Hope this helps you,
    Regards,
    Jitendra

  • How to build an array based on inputs from a text file

    Hi
    I have ta text file that has the following format. The apmlitude is the first value then I have the start index number and last index number
    Other index values in between should be zero
    (amplitide, start index number, end index number)
    2, 2 ,3
    4, 6, 7
    5, 10,11
    using this format I should make the foloowing array
    0,0,2,2,0,0,4,4,0,0,5,5
    Could you please help me to implement it in LabVIEW
    Thanks

    A few notes:
    - You'll want to use the Initialize Array function for 1) and 3) (if this is, in fact, how you want to do this.)  This function takes two inputs when initializing a 1D array- element value and array size.   
    - Change the polymorphic instance of Read From Spreadsheet File.vi to "Double" or "Integer"- there's no reason to read in these numeric values as strings and convert them later.
    - Will the text file always contain 12 elements worth of data?  If not, you'll need to change your logic for the number of elements to initialize.
    As Altenbach said, this seems a lot like a basic logic/homework problem.  My suggestion was only that-a suggestion.  It is not the only way to do this. Figure out a sequence of steps to get you from point A to point B before you jump in and start coding. 
    Regards,
    Tom L.

  • How do I create variables in Captivate?

    I'm hoping someone will be able to help me out. I'm working
    on some e-learn using Captivate at the moment and am not sure how
    we 'affect' variables once a user as completed a branch. i.e. I
    have three buttons on a page representing 3 different branchs. When
    a user selects a button he/ she follows the slides in the branch.
    At the end of the branch they are returned to the original slide
    with the 3 buttons, only now, the button that they originally
    selected is marked as complete or changed to represent having been
    completed (i.e. text is added, icon changes etc).
    I hope this makes sense. Any help would be greatly
    appreciated. Cheers

    I found that I could export my Captivate project to Flash and
    then use Actionscript to make checkmarks visible on the menu if
    various sections were viewed. Here's some code that may make this
    easier if you care to try the same thing:
    Initialization Code for a menu with four checkmarks (frame
    1):
    _global.section1viewed = false;
    _global.section2viewed = false;
    _global.section3viewed = false;
    _global.section4viewed = false;
    Menu Code (place on the frame(s) that display the menu):
    if (section1viewed) {
    checkmark1._visible=true;
    } else {
    checkmark1._visible=false;
    if (section2viewed) {
    checkmark2._visible=true;
    } else {
    checkmark2._visible=false;
    if (section3viewed) {
    checkmark3._visible=true;
    } else {
    checkmark3._visible=false;
    if (section4viewed) {
    checkmark4._visible=true;
    } else {
    checkmark4._visible=false;
    (Also place on the menu the 4 checkmarks which are movieclips
    and name their instances checkmark1, checkmark2, etc.)
    Set variables to true (place the appropriate statement by
    changing the 1 to 2, 3, or 4, on the last page of each section):
    _global.section1viewed = false;

  • How can i create Level Based Hierarchy using multiple logical table.

    Hi All,
    in my use case i have two master logical table.
    Division_Mst(divncd,DivnName)
    Department_Mst(deptcd,DeptName)
    and one logical table which contain both column Header (divncd,deptcd)
    and fact table detail where one measure column(empcd) using aggregation count on it.
    so i want to create levelbased hierarchy like this.
    DivnName
              |------DeptName
    which are come from(Division_Mst,Department_Mst) .
    so user can see no of employees division wise and drill down to Department wise.
    How can i achieved this?
    thanks
    Manish

    Check out Shay's blog https://blogs.oracle.com/shay/entry/adf_faces_dynamic_tags_-fora
    Timo

  • How to set a variable based on Select result?

    I wanted  to set the variable @adate based on the @adatecode value
    I tried this code but @date is not set to   min(d.DateValue)  as I wanted 
    SET @adate =  CASE @datecode WHEN 'sWTD' THEN 
    (select min(d.DateValue)
    from dbo.dimDate d
    inner join dbo.dimShowing s on d.DateID = s.DateID
    where d.BusinessYear = @ReportYear 
    end

    SET @adate =  CASE WHEN @datecode='sWTD'
    THEN 
    select min(d.DateValue)
    from dbo.dimDate d
    inner join dbo.dimShowing s on d.DateID = s.DateID
    where d.BusinessYear = @ReportYear
    end

  • How to create variables at runtime

    Hi,
    I need to know how can i create variables at runtime.
    or is their anything like array that we create in 'C' if yes . how can i define its size at runtime.
    Thanks,
    Dev.

    In forms, either record groups or pl/sql tables of records give similar functionality to an array. You have full programatic control of either but with completely different syntax. Record groups integrate well with certain forms built-ins and features (eg LOVs and Tree items). PL/sql tables integrate well with other pl/sql such as stored procedures. Unlike an array, a pl/sql table may be SPARSE (index numbers need not be sequential), and UNBOUNDED (no need to declare the number of rows).

  • How do i create an variable on an infoobject to use it in transformation

    Hello all,
    i do need to create an varaible, that i want to use in a currency conversion to specify the rate type. I didn't find in documentation and in this forum... can anyone help me?
    thanks a lot and
    Kind Regards
    Wolfgang
    Edited by: Wolfgang Pietsch on Jan 22, 2009 11:27 AM
    Edited by: Wolfgang Pietsch on Jan 22, 2009 11:54 AM

    Hi,
    In order to specify value for Currency rate type Dynamically you need to create variable for info Object 0RTYPE and the same can be used in Currency conversion.
    Use this info object in any of the infocube say ZTEST_C01 and create a dummy query ZTEST_Q1 based ZTEST_C01...
    In the query you  can create variable based on the Info Object 0RTYPE.
    After this you can use the same in the currency conversion creation.
    for More information
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/ec/076f3b6c980c3be10000000a11402f/frameset.htm
    Hope this helps
    Regards,
    Rangzz

  • OWB 11g  Process Flow - How to see variables and how to create variables

    Dear All,
    I have recently migrated from 10g to 11g rel 2.
    In 10g when I open a proces flow I can see all the parameters and variables I created on each activities on "Explorer" window. this allows me to craete new parameters and variables as well.
    But ones after I migrated to 11g, I cant see explorer window and there is no place to enable it as well.
    How Can I create variables, parameters in processes flow on 11g?
    Thanks in advance.
    Alex

    Hi,
    In 11g "Explorer" window renamed as "Stucture" and same details as 10g shows in Structure window. This window can enable and dissable (Show and Hide) using Menu => View=> Stuture option.
    Thanks

  • Creating variables in Report Painter

    Hi ...
    I would like to know ... how do I create variable ? I know it is via T CODE GS11, but when run tht, in the next screen it pops up for variable ? What variable do I need to enter ? is this predelivered Eg : CE-PK, or can we create one ? Please advise
    Also, I would like to I have a requirement for a report whereby the format is like this .....
    SALES       CURR MONTH (06/2006)  LAST YEAR          
    - Sales IT
    - Sales 1
    - Sales 2
    COGS
    - cogs 1
    - cogs 2
    - cogs 3
    COS
    - cos 1
    - cos 2
    - cos 3
    GROSS PROFIT
    Whereby, SALES = sales it + sales 1 + sales 2, COGS = cogs 1+cogs 2 + cogs 3, COS = cos 1+ cos 2+ cos 3. also GROSS PROFIT = SALES + COGS + COS
    The abpve report is inclusive of Cost Centre and Profit Centre, how acn I utilize the libraray in Report Pianter to create such report, is this possible in Report Painter whereby including Cost center and Profit Centre in one single report
    Pls assist me
    Nathan

    When you create your variable first enter the variable name. Second enter the reporting "table" to use. Third enter the "field'. Press enter. Next enter a default value for your field. Save you variable. It is now ready to use in your report painter.
    Using the PCA reporting tables gives you the profit center but not the cost center. You can only use one reporting table per report. you will need a cctr report for that.
    First create your own libray from GLPCT. Next create your report using your new library. The report painter can do the calculations that you have shown.
    You create a formula in the row or column to calculate your sub totals.
    pls assign points if helpful as a way to say thanks.

Maybe you are looking for

  • Error while making excise invoice

    Hi When i post excise invoice then i receive error No matching record found 'G/L accounts'(OACT)(ODBC-2028) i have given accounts to all excise formulas ie A/ptax account and A/Rtax account of  BED,Cess and Vat. how to solve? Thanks

  • Adobe Form - non-Interactive Pdf Print - Access to table cell

    Hi experts I am new to Adobe Print Form (non-interactive flowed form) and I am desparately need your help. I am merging table data from a context into a table on a form layout and then use function call to generate a print form and send it out as an

  • Selecting and deleting background to text

    I have Illustrator CS3 on a PC. I have a file with white text on a black background. How do I delete the black background so I am left with just the white text?

  • Exported file is half the size that FCPX said it would be

    I'm making a movie montage, project properties are as follows: 1280x720p 25 fps 48 kbps audio bit rate Using the Export File option, the settings match what's above, with H.264 being the codec (format is quicktime). It says the file size will be 482

  • Correlation ID after installing SP12

    Hi, does any correlation ID exist after installing Support Package 12? Thanks for your answer. Regards Stefan