Validation of custom field obj. 4: value of a field that is other req.

Hi all

I worked on a problem of validation of field for awhile. I have a custom on K4 drop-down list. This list of choices has two values YES and NO (a checkbox does not meet the conditions). What I do is if dropdown = "YES" then FieldA, FieldB and FieldC are needed elsewhere are not necessary. FieldA = FieldB = Date and FieldC = (short) text change. I tried many ways to validate in the fields A, B and C with statements such as IIf (list of choices = ValRech (list of choices, 'YES'), FieldA <>NULL, FieldA) or Iir (FieldValue (selection list) = 'YES', FieldA <>NULL, FieldA) etc... These are just my past attempts at this time I am trying just to random things to try to make it work. I'm probably using incorrect syntax (even if it passes the syntax checker). If anyone has any suggestions let me know. Also if I did not specify what it is I'm trying to let me know and I'll try to clarify.

Thank you
Z

Hello

If I understand correctly, you want this feature:

If drop-down list = NO => any values are contained in the to field, B and C.
If drop-down list = YES-online field is not null and field B is not null and C field is not null

To trigger the validation when the value of the drop-down list, then you must configure the Validation in the field to the list of choices:

[] = LookupValue("Picklist","NO") OR (Len ([]) > 0) AND Len ([]) > 0 AND Len ([]) > 0

You have to put the validation also on Field_A and Field_B and Field_C, because in the case of an update of the, let's say, Field_B, you should prevent Field_B is deleted.
If someone updates only Field_B and it does not change the value of the drop-down list, the validation on the choice list expression is not evaluated.

Simona

Tags: Oracle

Similar Questions

  • CF9/Solr: limitation of the cfindex custom fields

    On CF9, using Solr, I am indexing a database query, but as Verity in the present and previous versions of the CF, there is a limitation on the number of custom fields that I can index.  I know that the limitation is with the cfindex tag Solr is able to index whatever fields are specified in the schema.xml file.

    A solution, I have in mind is to change the schema.xml file by adding all custom fields, I need and can index my content using Solr (post.jar?) instead of cfindex.  The cfsearch tag should return any new fields, not only the more personalized 4.  Has anyone tried to do this?  Should what command I call to index content directly through Solr?

    Alternatively, does anyone else have other suggestions for workaround?

    Thank you

    -Jose

    Depending on your needs, you may be too complicate things.  Simply because that offers only CUSTOM1... CUSTOM4 does not mean that you must only have a subkey by CUSTOMn attribute value.  You can put whatever you want in these values, for example: lists the subkeys; serialized structs or keys, etc.

    I agree that it is less than ideal of how Solr support has been implemented, but you will probably be able to get to work for you in this case.

    --

    Adam

  • Background color of the custom field

    Hello

    I create a custom field that is as shown in the attached display a bar graph.

    I don't want to change the background color of the field of another color. I tried to overridding method paintBackground of the field as shown below:

    protected void paintBackground(Graphics arg0) {
            arg0.setColor(Color.DARKGRAY);
            super.paintBackground(arg0);
        }
    

    but it seems to have no effect. Could someone kindly help me with this. Thanks in advance.

    Kind regards

    S.A.Norton Stanley

    Try this...

    Create a class that extends the scope and implements DrawStyle

    and override its Paint method... to set the background color

    Draw the shape you want with the graphics object and either fill the area or set the background color.

    THX

    Rabi Ray

  • Changing custom field problem Listener

    I created a custom field that works as a button. He painted a bitmap to the screen. And when it focuses it changes the color of the image. However, I try to add a field change listener to it. I looked on the forum and found this code.

    protected boolean navigationClick(int status, int time)
    {
         fieldChangeNotify(1);
         return super.navigationClick(status, time);
    }
    

    It works but I have a problem. You see, my button now push a small screen, thin in the stack that has another button of the same type on it (custom button). At the moment it is the only button on this screen, which means that it has the focus. But it seems that once my button has the focus, I can click anywhere and it is always enabled. I only want to be activated when I touch it. Any suggestions? Here is my code

    public class MenuButtonField extends Field
    {
        Bitmap imagePic;
        Bitmap highlightedPic;
        public MenuButtonField(String imageName, String focusedImg)
        {
            super();
            imagePic=Bitmap.getBitmapResource(imageName);
            highlightedPic=Bitmap.getBitmapResource(focusedImg);
        }
    
        public void layout(int width,int height)
        {
            setExtent(20,80);
        }
    
        public boolean isFocusable()
        {
            return true;
        }
    
        public void drawFocus(Graphics graphics, boolean on)
        {
            paint(graphics);
        }
    
        public boolean touchEvent(TouchEvent message)
        {
            int type=0;
            type=message.getEvent();
            if(type==TouchEvent.CLICK)
            {
                fieldChangeNotify(1);
                return true;
            }
            else{
                return false;
            }
        }
    
        protected boolean navigationClick(int status, int time) {
            fieldChangeNotify(1);
            return super.navigationClick(status, time);
        }
    
        protected void paint(Graphics g)
        {
    
            g.drawBitmap(0, 20, 20, 80, imagePic, 0, 0);
    
            if(this.isFocus())
            {
                g.drawBitmap(0, 20, 20, 80, highlightedPic, 0, 0);
            }
    
        }
    }
    

    PLEASE HELP ME

    I found help here
    http://supportforums.BlackBerry.com/T5/Java-development/navigationClick-invoked-when-clicking-outsid...

    The position of Scribe the Lion was the solution.

  • Problem in designing a custom field for the display of paragraph

    Hello

    I need to develop a custom field that is supposed to act as a RichTextField with the additional of the hyperlink feature as seen in the web pages. I have a few paragraphs of text with an id associated with each of them. A paragraph may have link to another paragraph. I think that the hyperlink is actually like a button.

    My screen will consist of a single paragraph. If any hyperlink (id) in this paragraph is preesed then the screen reloads with another paragraph (id in a hurry).

    My problem is to develop a custom field for the display of this paragraph.

    Point: several lines of text without interruption. Some of the text may be bold, italic. a text can be the hyperlink.

    Now I'm stuck. I have no ideas how I can start with. Can someone give me please suggestions as to how I can start with?

    Thanks in advance

    Bika

    I have a different Suggestion.

    If you are using an ActiveRichTextField, you get two things:

    (1) the ability to shape a field using different fonts:

    Comment - formatting text in a RichTextField
    Article number: DB-00124
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800345/...

    (2) the ability to create "links" automatically using string models

    How to-to comparison models in the BlackBerry smartphone to provide a user experience integrated applications
    Article number: DB-00525
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800608/...

    Using models of string, I think you'd be able to create ' hot-link in your text, which the run Menu item was able to process you want.

    Just an idea.  Hope this works for you.

  • Part of the cursor remains in the custom field

    Hello, guys!

    I have a problem.

    In the custom field that extends EditField, I want to draw in the text and the image and draw an appropriate in the cursor position. Then, we thought it would only calculate in advance of the police and the width of the image in the paint method to display the text and image and to the similar development and I tried. However, the cursor drawing is wrong. When the cursor moves from right to left, a part of the slider to the position immediately before the rest.

    Y at - it a good solution?

    JDE component package: 4.6.0

    I solved by myself.

    'FocusChangeListener' is mounted with EditField. And "invalidate()" has been called in the method "focusChanged().

    It became a great result for me.

    Thank you.

  • Customizing fields using the BC &amp; DW form builder

    I've created a form, "pre-order" as follows:

    1. CRM > extend CRM database, where I created the CRM data fields
    2. Web Forms > Add Web form > I added the form default CRM 'contacts' fields in the form BC Builder
    3. I then downloaded the form using DW and customize the fields; example: changed "at home" to "delivery address", removed the 'cell phone' field, changed "telephony" to "primary phone"...

    After pressing this form dates back to BC, I tested the form and the fields that I had custom data not in the CRM.

    Can someone help me with this problem?

    Thank you

    Catherine

    Thanks for your reply. In fact the form of CRM data works (data capture to CRM). His section of default contact form, where I customized fields that does not work. I now work with my 3rd BC tech on it as I write this response.

  • Number of custom fields

    Hello

    I know that there are a number of custom fields that are permitted to appear in each instance, and then after that it is no more. Anybody know a way we can the total amount of the costomn fields instead of counting each tab and how custom dates, ect boxes appear within the system?


    Thanks in advance
    I

    It is the custom for EACH object On Demand fields number (account, Contact, lead, opportunity, etc.):
    Box 35
    Currency 25
    Date 25
    Time 25
    Whole number 35
    Several list of choice of salt 10
    Number 33
    P 30
    10 phone
    Drop-down list 100
    Text (Long) 30
    Text (short) 45
    WebLink 100

  • Need help with Custom Field Layout - getting wirer height value

    In the BB Simulator, I get a strange value placed in in my field layout() method custom. The width is 320, which is correct, but the height is 1073741823 and it takes 240 or less. In this test, my custom field is the only field in the Manager, so I expect to 240.

    I tried two different simulators - BB curve and the 8800. I use JDE 4.5.0 in Eclipse 3.4.1. This is the code for my method of layout:

    Protected Sub layout (int width, int height) {}
    s long = getStyle().
    If ((s & USE_ALL_WIDTH)! = USE_ALL_WIDTH) {}
    width = Math.min (width, getPreferredWidth());
    }
    If ((s & USE_ALL_HEIGHT)! = USE_ALL_HEIGHT) {}
    height = Math.min (height, getPreferredHeight());
    }
    setExtent (width, height);
    model.setExtent (width, height);
    Model.Scroll (0, 0);
    }

    I expect the value of the screen height, or less, if the domain is configured correctly.

    I'm upgrading my custom field in a VerticalField Manager with the following attributes:

    Super (VerticalFieldManager.USE_ALL_WIDTH
    | VerticalFieldManager.USE_ALL_HEIGHT
    | VerticalFieldManager.FIELD_HCENTER | VerticalFieldManager.FIELD_VCENTER);

    Is this a bug in the Simulator, or I understand the API correctly? Is there a way to 'reset' the Simulator - I tried to get out of Eclipse and restart Windows, but I always get the same value.

    Thank you!

    Mark

    A VerticalFieldManager comes, I think, with default VERTICAL_SCROLL.  If you do not want to scroll through this particular Manager, add VerticalFieldManager.NO_VERTICAL_SCROLL to your forests of style and it will be laid out with only the height and the actual width.

    Also, since you setExtent() by yourself, USE_ALL_HEIGHT and USE_ALL_WIDTH are redundant, I think.

    Hope that helps,

    Arkady.

  • How to retrieve the value of a custom field

    Hello @all.

    In my vCenter, I created a custom field 'email '. The value of this field is set to the e-mail address of the operator of that belongs to a virtual machine.

    I would like to retrieve these values in a perl script. But I have found a method to set the values of the custom fields. For example:

    $CustomFieldsManager -> SetField(entity => $_, key=> $emailKey, value => "[email protected]");
    

    What should I do to retrieve the value of the $emailKey key? Could someone provide a quick and dirty-snippet, please?

    Best regards

    Trondesson

    of course, in this discussion https://communities.vmware.com/message/1512863#1512863 you can see how it's done

  • PowerCLI script retrieve vmname based on the value of the custom field

    I want to retrieve a set of virtual machine based on a custom attribute names.  I have a custom field called alert level and I want to list only servers with an alert level of 4 so that I can automatically turn them off during a power failure.

    That's what I have so far:

    Get - VM | Select Name -ExpandProperty CustomFields | {$_.key -eq "Alert Level"} | {$_.value -eq 4}

    This seems to me the namem, field and value but all I want is the name.

    Any ideas?

    Try this

    Get - VM | where {$_.} {CustomFields ["warning level" ""]- eq 4} | Select the name of


  • Validation of DateTime field (without custom management functions)

    Hello

    I need to know how I can validate if a date is correct or not and fail to do something.

    I have a DateTime Field field, with a pattern ' DD / MM / YYYY ', the value appears correctly using the selected template, the problem is validation.


    Now I just that if the date is wrong, teaches an alert to the user, and the focus returns to the DateTime control until you enter a valid value.

    I need something like:

    -Form1.SUBVENCION_O_AYUDA.dateTimeField1: Validate - (JavaScript, client).

    If (this.rawValue! = null & &! test (this.rawValue, ' DD/MM/YYYY')) {}

    xfa.host.setFocus ("this");
    }

    How will I know if the validation is successful or not (without having to implement long-standing management functions)?

    By default, if I put 'validation model messaga' field, a warning message is displayed, but here the emphasis is more and the user can continue to fill the rest of the form, whereas the datetime field is filled with an incorrect value.

    I want to warn the user to continue to fill out the form, if the value in the dateTime field is not valid.

    Any idea?

    Thank you!

    Hello

    If your date may not be formatted correctly against your view model then the formattedValue is equal to the rawValue.

    Thus, in the event output put;

    If (this.rawValue is this.formattedValue)

    {

    App.Alert ("enter a date in the dd/mm/yyyy" format "");

    xfa.host.setFocus (this.somExpression);

    }

    Bruce
  • drawFocus, drawHighlightRegion &amp; XYRect is equivalent to a white rectangle in a custom field?

    It's one of those days where I should have stayed at home.

    Why the following sets a rectangle white when the false boolean value on?

    In other words, when it put there at the point, I get the highlight of rectangle of color TYellow as expected, when there is no discussion on the custom field (a class that extends the field); a white rectangle is drawn.

    I don't want to take anything either when there is no accent, which is equal to the value Boolean false.

    protected void drawFocus(Graphics graphics, boolean on) {
      paint(graphics);
      if (on) {
        XYRect rect = new XYRect();
        getFocusRect(rect);
        drawHighlightRegion(graphics, HIGHLIGHT_FOCUS, on, 0, 0, w, h);
             int prevColor = graphics.getColor();
         graphics.setColor(Colors.TYellow);
         graphics.drawRect(x, y, w, h);
         graphics.setColor(prevColor);
      }
    }
    

    Good or bad, I solved the problem by following these steps:

    1. My rectangle of drawing in paint with the previous color.
    2. Adding a call to invalidate in the onUnfocus method:
    protected void onUnfocus() {
      invalidate();
    }
    

    If there is a better, I'll be first in line.

  • Question regarding setExtent and getPreferredWidth for the custom field

    I am trying to understand the difference between getPreferredWidth and setExtent, which relate to the width of a custom field.

    I create a field that may be greater than the width of the screen. The field is made up of cells (for example columns and lines or cells, such as a table). The cells contain text, shapes, lines, color, etc. When I display the field I only paint the visible columns on the screen and allow the user to use the trackball to accomplish the columns out of the screen.

    At present, getPreferredWidth returns the total width of the field without all the empty columns, is longer than the width of the screen. I use the same value in setExtent for width. GetPreferredWidth must return the size of the field that is painted on the screen - the total width less the width of the columns out of the screen? I have the same question about setExtent - width either in total, longer than the screen width or the width of the part of the field that is painted on the screen?

    If I use the width of what is painted on the screen or the other of these methods, then the width changes when the user scrolls through the field. As the user scrolls, I calculate the number of columns will agree to a width of the screen and paint these columns. Is it a problem to have the PreferredWidth and the setExtent change width? I read that setExtent is called only when the Manager sets this field, so that the changes will not be recognized.

    It seems to work in two ways in a few simple tests, but I was just curious as the value of width that is right.

    Thank you!

    Mark

    When a field has changed in a way that requires the update of the screen (for example, after scrolling offset changes), simply call invalidate() from this area. That will eventually lead to paint (Graphics) for the field. At this point, you return the update field. (If only part of a field - as a single cell - needs to be updated, there invalidate() versions that accept arguments where, for efficiency, you can limit the update for just this part.)

    If I understand your needs, you can achieve the effect desired in the paint method. You can use the current dimensions of the field, the cutting of the graphics area, and your internal roll compensates to decide what to paint and what to delete. Let your custom field leave white space where you decide of doesn't make is not part of a cell. There is no need to change the scope of the field.

    If you go about it by changing the dimensions of the field, and then you ask the system to play much more work he has to do. If the custom field is the only field on the screen, it won't make much difference in the behavior (although there may be performance). With more than one field, it can be weird effects. For example, suppose that your custom field is one of several fields in a HorizontalFieldManager and you change the field width. When the HorizontalFieldManager recalculates its own layout, it will change the horizontal position of the fields to the right. The effect on the user, I think, would be really confusing: as the custom field parade, parties to the right of the screen could bounce left and right as the changed width field. I can't imagine that's what you want.

    Here's another way to think about this: absent some bit of style, your custom field would prefer be exactly wide and high enough to show all without scrolling. So the width and height would be based on adding the appropriate cell widths and heights, regardless of what actually is on the display. (It's also a long time that you do not have something fanciful.) If the optimum height is a function of the width available - as with sheathed on the line of text - you would implement this logic in the layout method. You then have no use for autonomous preferred width and height).

  • Two sliders in the custom field definition

    Hi guys,.

    First of all, I want to thank all those who helped me to this day. This forum has been essential for blackberry dev work I do, and I would be screwed without you guys. That being said, I'm having a problem. I install a custom like this text entry field.

    (1) creates a vertical field Manager, assigned a background and resized image with setExtent(). (works fine)

    (2) created a new type of field and inserted in the vertical field Manager to make native look (almost works)

    The problem I have is that two sliders are appearing. Cursor #2 is dynamically updated as it should be, but the #1 cursor seems to be a "flawed slider. Please see the image below for details.

    The custom field is defined using the following code. If I remove the custom field, or cursors comes, so I am positive that it is the source of the problem.

        public class JustifiedEditField extends HorizontalFieldManager implements FieldChangeListener {
            BasicEditField ef;
    
            public JustifiedEditField(long style) {
                super(USE_ALL_WIDTH);
                ef = new BasicEditField(style) {
    
                    protected void onDisplay() {
                        setPosition(10, 17);
                        update(0);
                        //invalidate();
                    }
    
                    protected void update(int d) {
                        super.update(d);
                        setPosition(10, 17);
                        //invalidate();
                    }
    
                    protected void paint(Graphics graphics) {
                        graphics.setColor(Color.WHITE);
                        getFocusRect(new XYRect());
                        drawFocus(graphics, true);
                        super.paint(graphics);
                    }
    
                    protected void onUnfocus() {
                        invalidate();
                    }
    
                    protected void onFocus(int direction) {
                        invalidate();
                    }
    
                    /**
                     * Intercepts ESCAPE key.
                     * @see net.rim.device.api.ui.component.TextField#keyChar(char,int,int)
                     */
                    protected boolean keyChar(char ch, int status, int time) {
                        switch(ch) {
                            case Characters.ESCAPE:
                                // Clear keyword.
                                if(super.getTextLength() > 0)
                                {
                                    setText("");
                                    return true;
                                }
                        }
                        return super.keyChar(ch, status, time);
                    }
                };
                add(ef);
            }
    
            protected void sublayout(int width, int height) {
                super.sublayout(width, height);
                setExtent(width, 57);
            }
    
            public BasicEditField getEditField() {
                return ef;
            }
    
            public String getText() {
                return ef.getText();
            }
    
            public void setText(String value) {
                ef.setText(value);
                invalidate();
            }
    
            public void setChangeListener(FieldChangeListener changer ){
                ef.setChangeListener(changer);
            }
    
            public void fieldChanged(Field field, int context) {
                invalidate();
            }
        }
    

    I am totally stuck on this issue, any help would be really appreciated. TIA!

    I came up with an alternative solution. It turns out that I can use a transparent border to set the offsets to where the edit field must be located within the input Manager; thus eliminating the need to use setPosition.

Maybe you are looking for