Select quantity depending on style # choosen – Part 2

HI,
I have a drop down menu with 2 style numbers: 2602 and 2622
If the client choose 2602, then the number 20 gets written in the next field.
If the client choose 2622, then the number 40 gets written in the next field.
What would be the script for that (and where should I put it)?
Thanks.

OK, now there is a problem.
When I hit the button to clear all fields, the combo box and the related text field don't clear.
My script to clear the form is: 
if (app.alert("Do you really want to clear all fields of this form?", 2, 1) == 1)
  this.resetForm();
I've got another combo box in that Form and it clear fine (that one has no Export value attached to it).

Similar Messages

  • Select quantity depending on style # choosen

    HI,
    I have a drop down menu with 2 style numbers: 2602 and 2622
    If the client choose 2602, then the number 20 gets written in the next field.
    If the client choose 2622, then the number 40 gets written in the next field.
    I assume the field that has the quantity (20 or 40) would have to be read only so nobody can change them.
    What would be the script for that (and where should I put it)?
    Thanks.

    George_Johnson wrote:
    You could use a custom calculate script for the text field. It would get the value of the combo box and set the value of the field (event.value) based on which item was selected.
    Thanks George, but I wish I could write a script like that.
    By that I mean that I don't know what the script should be.

  • JTextPane, Selecting Text and Applying Styles

    Hello,
    Anyone encounter this situation? I have a mini word processor application that I have written using the RTFEditor kit and a JTextPane. To change style, e.g bold, font size, font face, etc, one can select text and then click a button or select a menu item. That part works fine. The styles are primarily changed by using the Action classes provided in the javax.swing.text.* package.
    The problem is, that if a user selected text of more than one style, all of the text is automatically converted to the style of the first part of the text selected, without the user even eanting to change ANY style just yet.
    If anyone knows why this might be happening I would surely appreciate it.
    Thanks,
    acal

    Solution to the style appling problem...
    public void actionPerformed( ActionEvent e )
            if (flag) return;
            if(e.getSource() == boldButton)
                SimpleAttributeSet attrs = new SimpleAttributeSet();
                attrs.addAttribute(StyleConstants.Bold,boldButton.isSelected());
                applyStyleToSelection(attrs);
                editorPane.grabFocus();
                return;
    public void applyStyleToSelection(AttributeSet attrs)
            int start = editorPane.getSelectionStart();
            int end = editorPane.getSelectionEnd();
            DefaultStyledDocument doc = (DefaultStyledDocument) editorPane.getDocument();
            doc.setCharacterAttributes(start, end - start, attrs, false);
            StyledEditorKit styled = (StyledEditorKit) editorPane.getEditorKit();
            MutableAttributeSet mas = styled.getInputAttributes();
            mas.addAttributes(attrs);
        }Filipi Silveira
    [email protected]

  • If I do not select F11 ( full screen ) a big part of the screen "falls" of the right hand side of my monitor and is not readable, I am not able to find the neccesary adjustments.

    Question
    If I do not select F11 ( full screen ) a big part of the screen "falls" of the right hand side of my monitor and is not readable, I am not able to find the neccesary adjustments.
    Screen 2/3 blanco on the left side
    With F11 all OK.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Calling selection screen depends on radio buttion selection

    I need to call two selection screens (not radio buttons selection screens) depends on radio buttion selection
    Eg :
       R1-radio button
      R2- radio button
    if we select R1- we should get selection screen to enter input values like parameters, select options
       PARAMETERS:     p_abc TYPE    MARA-matnr OBLIGATORY
      SELECT-OPTIONS: s_mno  FOR   MARC- chngr OBLIGATORY.
      PARAMETERS:     p_xyz TYPE     MARA - amktxOBLIGATORY.  (just example)
    If we select R2, we should get selection screen to enter input values like parameters, select options
    PARAMETERS:         p_abcd TYPE    KNA1-matnr OBLIGATORY
      SELECT-OPTIONS:  s_mnop  FOR   VBAK- chngr OBLIGATORY.
      PARAMETERS:        p_xyza TYPE     VBAP - amktxOBLIGATORY  (just example)
    if we select 1 , other should be hide
    Madhu

    Hi,
    this is an example:
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETER R1 RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND SET1.
    PARAMETER R2 RADIOBUTTON GROUP G1 .
    SELECTION-SCREEN BEGIN OF BLOCK B21 WITH FRAME TITLE TEXT-004.
    PARAMETER: P1 LIKE IBIPPARMS-PATH MODIF ID FPA.
    SELECTION-SCREEN END OF BLOCK B21.
    SELECTION-SCREEN BEGIN OF BLOCK B22 WITH FRAME TITLE TEXT-004.
    PARAMETER: P2 LIKE IBIPPARMS-PATH MODIF ID FPB.
    SELECTION-SCREEN END OF BLOCK B22.
    SELECTION-SCREEN END OF BLOCK B2.
    DATA: P_CHECK.
    AT SELECTION-SCREEN OUTPUT.
      IF P_CHECK <> 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FPA' OR
             SCREEN-GROUP1 = 'FPB'.
            SCREEN-INPUT = '0'.
            SCREEN-INVISIBLE = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
        P_CHECK = 'X'.
      ENDIF.
      IF R1 = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FPA'.
            SCREEN-INVISIBLE = '0'.
            SCREEN-INPUT = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-GROUP1 = 'FPB'.
            SCREEN-INVISIBLE = '1'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF R2 = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FPB'.
            SCREEN-INVISIBLE = '0'.
            SCREEN-INPUT = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-GROUP1 = 'FPA'.
            SCREEN-INVISIBLE = '1'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Angelo.

  • OSS notes for MB1B in checking Amount and Quantity depending on the mat. #

    Dear All:
    Where can i download OSS notes in MB1B for  checking the amount and quantity depending on the material number?
    Thanks,
    CHOCO

    Hi ,
    We are not getting what you mean to say.
    But as far my understanding of your query I am giving the reply.
    OSS notes can be download at the tcode SNOTE.
    Pls go to the tcode SNOTE-> GOTO ->DOWNLOAD SAP NOTE.
    here you need to give the sap note number.
    To get this number you first need to search in service.sap.com and find the relevant note that is useful for ur scenario.
    And after finding that note and we need to give this number in SNOTE tcode and we need to download.
    Pls tell me your requirement clearly so that i will try to find a oss note for you.
    Pls get back to us for further assistance . Happy to help you.
    Regards,
    Viveks

  • Defining Selection-Screen Depending on Client

    Good Morning,
    I need to hide one parameter from my selection-screen depending on sy-mandt.
    Is it possible? If yes, can anyone show an example?
    Regards,
    Pedro Gaspar

    hi
    u can put ur fields in a block sepicific for a particular client.
    u check the mandt and display the corresponding block while hiding the others.
    check this sample code:
    TABLES: eban,
            SSCRFIELDS.
    SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE title.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    PARAMETER:rad1 RADIOBUTTON GROUP rad USER-COMMAND frad1 DEFAULT 'X',
              rad2 RADIOBUTTON GROUP rad .
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
    PARAMETER: mtr AS CHECKBOX MODIF ID g3 USER-COMMAND chk1,
               p_matnr TYPE eban-matnr MODIF ID g1,
               sloc AS CHECKBOX MODIF ID g3 USER-COMMAND chk2,
               str_loc TYPE eban-lgort MODIF ID g4.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
    SELECT-OPTIONS: matnr1 FOR eban-matnr MODIF ID g2.
    SELECTION-SCREEN END OF BLOCK b3.
    SELECTION-SCREEN PUSHBUTTON /20(10) name USER-COMMAND UCOM.
    SELECTION-SCREEN END OF SCREEN 100.
    name = 'FETCH'.
    title = 'Test Report'.
    CALL SELECTION-SCREEN '100'.
    TYPE-POOLS slis.
    declaration of internal tables and work areas to be used
    DATA: BEGIN OF it_pr OCCURS 0,
          banfn TYPE eban-banfn,
          bnfpo TYPE eban-bnfpo,
          loekz TYPE eban-loekz,
          statu TYPE eban-statu,
          ekgrp TYPE eban-ekgrp,
          matnr TYPE eban-matnr,
          werks TYPE eban-werks,
          lgort TYPE eban-lgort,
          preis TYPE eban-preis,
          peinh TYPE eban-peinh,
          END OF it_pr.
    DATA: BEGIN OF it_mat OCCURS 0,
          matnr TYPE eban-matnr,
          END OF it_mat.
    *DATA:BEGIN OF ITAB1 OCCURS 0,
      DATA: l_answer.
    DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
          wa_fieldcat LIKE LINE OF it_fieldcat,
          it_event TYPE slis_t_event,
          wa_event TYPE slis_alv_event.
    declaration of variables to be used
    DATA: r_ucomm TYPE sy-ucomm,
          mat_no TYPE eban-matnr,
          len TYPE i VALUE 1,
          count TYPE i VALUE IS INITIAL,
          iflag TYPE i VALUE IS INITIAL,
          iflag1 TYPE i VALUE 0.
    DATA :pr_id TYPE sy-repid,
    rt_extab TYPE slis_t_extab.
    INITIALIZATION.
      pr_id = sy-repid.
    AT SELECTION-SCREEN OUTPUT.
    <b>  IF rad1 = 'X' AND SY-MANDT = <client 1></b>
        LOOP AT SCREEN.
          IF screen-group1 = 'G1' OR screen-group1 = 'G4'.
            screen-active = '1'.
            screen-input = 0.
          ELSEIF screen-group1 = 'G2'.
            screen-active = '0'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      <b>ELSEIF rad2 = 'X'  and sy-mandt = <client 1></b>
        LOOP AT SCREEN.
          IF screen-group1 = 'G1'  OR screen-group1 = 'G4' OR screen-group1 = 'G3' OR screen-group1 = 'G5'.
            screen-active = '0'.
          ELSEIF screen-group1 = 'G2'.
            screen-active = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
      IF mtr = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'G1'.
            screen-input = 1 .
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
      IF sloc = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'G4'.
            screen-input = 1 .
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    clear sy-ucomm.
    iflag = 1.
    endif.
    regards
    ravish
    <b>plz dont forget to reward points if helpful</b>

  • Select value depending to condition

    I need to assign a value to a query select field depending on a condition from another select field.  Please tell me that this could be posible to do within the Query Manager on SAP B1.  If so, could you help me with this?
    Thanks in advanced,

    Rodney,
    This can be achieved using the case function in SQL.  You can lookup CASE contruct in the SQL help files.  I will give you a small example below for your understanding.
    SELECT T0.DOCNUM, T0.DOCDATE, T0.CARDCODE, CASE WHEN T0.SLPCODE = -1 THEN NULL ELSE T1.SLPNAME END
    FROM ORDR T0 INNER JOIN OSLP T1 ON T0.SLPCODE = T1.SLPCODE
    In the above sample SQL, I am checking the value of the Sales Person code on the Sales Order and if it is -1 (-No Sales Employee-), I am printing blank. 
    Regards
    Suda

  • Update Styles not working, select all uses of style missing

    Two more things tha I use often are missing from 5.0.
    1. If you want to select all uses of a heading and then change attributes, it seems that you cannot.
    2 When a style appears with a asterisk it means there is an override and you have the option to click on Update Style.  Doesn't work.
    Okay, so three useful things absent in 5.0 and they bugged me in the first 10 minutes (counting the missing Outline View).  Otherwise it looks like a fabulous and simplified update. 
    One of th best additions is that Comments now track between the Desktop and iPad. Yayee! I don't have to use foot notes any more.

    I would like to see "select all uses of style" make a comeback. That was an easy way to delete things quickly.
    For #1, you can change attributes for one instance of the heading and then update the style. This will apply the changes to all instances of the heading. Which leads to...
    #2. I was able to update my styles by going here:
    Is that not working for you?

  • Why CK11N consider Scrap even if activity formula isn't quantity dependent?

    Dear guru ,
    i have a finished material that have a component in the bill of material with a component scrap. This component is a semi-finished material that have an operation in the routing with a work center with a formula key for the calculation of costs of the work center’s activity type not dependent of quantity , it’s only dependent of time machine.
    If I run CK11N for this finished material and I see the Material Cost Estimate with Quantity Structure View , for the resources involved the system consider the quantity and value added of component scrap in percent.
    But the formula key for the calculation of costs of the work center’s activity type not depend of quantity , why CK11N consider the component scrap even if activity formula is not quantity dependent ?
    Thanks for your help

    Hi ,
    System will include the cost Component scrap while doing cost estimate.
    Since u have assigned  component scrap % at BOM, u are declaring , that much amount of extra components are  need to produce FG & cost of same will be included in production also.
    Without qty dependent , how system will calculate the Total time for the operation.
    For Ex,
    Operation qty = 10 nos
    Process time = 1 hr / Nos
    Activity cost for process = 100 USD/ Hr.
    Total activity cost for that operation is = 1 * 10* 1000 = 10000 USD.
    Letus know the costing  formula u have  assigned for Activity type at workcenter.
    Pradeep

  • Selecting particular range of style using script

    HI All,
    Can anyone suggest me that how we can select the range of text using script.
    I am having some different para styles say for eg., PS1, PS2, PS3, PS4...........
    I may applyed these styles in some jumping order but except PS1, now I want to select paragraphs with applied style PS1 to stop before the next appearence of PS1 style.
    Like: In a document Para 1, 10, 14, 25 were applied with PS1, so the selection should go in the way like 1-9, 10-13, 14-24 and so on
    Regards,
    love_all

    "The" index of a paragraph is nothing special, it's the index of the first character of that paragraph inside its parent story. In particular, it does NOT tell you "this is the 5th paragraph" or something like that.
    This is because "Paragraph" is an artificial construct inside "Text", not a truly existing first class object. Same as "Line", "Word", "Character", and indeed, any text selection at all.
    Since you already have a "found text" array, "the index" of the nth entry's paragraph -- with the constraint described above -- can be simply found by using foundText[n].paragraphs[0].index (the index of the first character of your foundText is foundText[n].index).
    If you DO need to know the nth number of the paragraph, search this forum. I think Peter Kahrel answered to a post to answer that exact question.

  • Select boxes dependent on each other?

    Hi is there a way to use selectboxes / textfileds that depend on each other.
    select box 1. reads from database names
    select box 2. this one is filled when a chiose from box 1 is selected.
    (after a database question based on the result in box 1)
    inupttextfields 1 and 2 are filled after a new database request based on the choise in select box 2.
    pleased with different kind of answers. without javascripts adn also with use of
    javascripts. (Im not so used with javascripts)
    Plese give me a simple example and not just a link.
    thanks.

    Plese give me a simple example and not just a link.There is no simple example, because this is highly specific on your webpage implementation and database. search google for "javascript dynamic select box", or "javascript dynamic option lists". That should give you some examples.

  • Multiple selection criteria on same field, different parts of report

    Post Author: CathyH
    CA Forum: Formula
    New user here - I just finished a Crystal Reports course and still don't know what I'm doing so I need help!
    I am building a report that will show Bugdeted Revenues and Costs and Actual Revenues and Costs (4 seperate fields).
    My report will be divided into several sections i.e. Manufacturing Phase, Installation Stage, etc.
    Each section will include different Cost Categories (another field) so I need to be able to pull only certain records (categories) from this field.
    Could someone please tell me how to structure the report as follows:
                                                        Budgeted Revenue        Budgeted Costs                 Actual Revenue            Actual Costs
    Manufacturing Stage
    Cost Category:
    Paint                     
    Hardware                         
    Installation Stage
    Labour
    I will be most grateful for any help you can provide.
    Cathy

    Post Author: CathyH
    CA Forum: Formula
    Ok - so I've set up the different sections of the report...but I'm trying to insert formula fields for each Cost Category and having trouble with the formula to select only certain records (I keep getting an error).  It's probably very simple but I can't for the life of me figure it out - I tried all kinds of formulas before I posted for help.
    Maybe this will clarify:
    Sum the Total Current Revenue      of only Cost Category "Paint"
    {PMCATEGT.TCURREVHM}        {PMCATEGS.DESC} = "PAINT"
    and in another part of the report for example
    Sum the Total Current Revenue of only Cost Category "Installation"
    Cathy

  • FindChangeByList script question, re: when a style is part of a style group

    Hi,
    I'm using InDesign's FindChangeByList script and am running into a problem.
    Here is the problem line:
    grep {findWhat:"^."} {appliedParagraphStyle:app.activeDocument.paragraphStyleGroups.item("Text").paragraphStyles.item("Body2.TextIndent"), changeConditionsMode:1919250519} {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true} //Change everything to Text.indent2 style
    What I am trying to do is format every paragraph with the style called "Body2.TextIndent" which is located in my style sheets under a group called "Text"
    This line is not working for me; I get a JavaScript  "Error #17. Error string: variable name expected."
    Please note that I CAN get this line to work just fine if I use a style that is NOT in a group. For instance, this line works fine for me:
    grep {findWhat:"^."} {appliedParagraphStyle:"Body2.TextIndent", changeConditionsMode:1919250519} {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true} //Change everything to Text.indent2 style
    The problem is apparently that the FindChangeByList script doesn't like style groups. I found this by Googling the internet and found this link:
    http://www.listsearch.com/indesign/Thread/index.lasso?17986
    Can anyone help?
    Thanks.

    Kasyan, it works for me now! THANKS! One thing... I notice that in your line, you removed the part "changeConditionsMode:1919250519". Maybe that was the problem? I'm new to scripting. What does that line do? Can I leave it out?
    p.s. I'm using CS4 on Windows XP Pro

  • GREP style as part of paragraph style

    I'm wanting to create a GREP style that uses a character style. Whenever certain words (No class) appear followed by dates. Sometimes it is a single date and sometimes more than one date. For example:
    No class 7/11.
    No class 7/11-8/11.
    What I have so far is:
    No class \d+.
    This works okay through the words "No class" and the first digit, but not for the whole sentence. I've tried different combinations but nothing that works correctly.
    Can anyone help?

    Peter,
    I so much appreciate your help with this. Your explanation makes it understandable. But there is still a mystery.
    The GREP for Instructor: Instructor Name works fine. The GREP for the date sentence is not working. Instead of the date sentence becoming italic, it  matches the first part of the paragraph. This is what the GREP looks like:
    This is what the paragraph looks like with the GREP applied:
    It should look like this:
    In a separate issue in another paragraph, which is a heading paragraph, I have a similar situation. The headings are bold, some headings list ages, and some list ages AND whether parental participation is required. I thought I could extrapolate from the information you've given me to fix this paragraph as well. I've tried different combinations, but so far haven't gotten it to work. The paragraph looks like this:
    But it needs to look like this (bold paragraph with ages in regular,and parent requirement in italic):
    The heading doesn't always have an age requirement, and doesn't always require parental participation.
    The catalog is quite long, so if there is a way to fix these two types of paragraphs, it would save a ton of time.

Maybe you are looking for

  • How do I create a hyperlink so that it opens up a flash file?

    I can't find anything in PS7 to do the link. Thanks,

  • OSPF PE-CE

    Hi, Can someone please clarify for me the role played by OSPF in the backbone when ew are using OSPF between PE and CE. How is this different to when we're using a differenr PE-CE routing protocol? A route with the "down bit" set, is it dropped by MP

  • ASDoc @see links are not navigable

    I'm using Flash Builder 4.6 and try to use references to project-internal and external content in the ASDoc headers above classes functions. According to the documentation http://livedocs.adobe.com/flex/3/html/help.html?content=asdoc_6.html this shou

  • How to synamically choose and load a JAR at runtime

    Hi all, I have an application that uses an API to communicate with a backend system. There are five API jars that each support a different version of the backend system. I want to be able to select the jar at runtime. I can't put each in my CLASSPATH

  • Alternating strokes in a table style

    I'm setting up a table style like the following: |--------||---------|------------| |--------||---------|------------| |--------||---------|------------| |--------||---------|------------| |--------||---------|------------| |--------||---------|-----