Thursday, October 14, 2010

How to control DATAWINDOW in PB modify column properties



Application in the preparation of management information systems, typically encounter a common problem is how to control under different conditions data in the table columns, such as for the same DATAWINDOW different users have different operations (such as for data entry personnel can change data , and for general inquiries, staff can not change the data), following on the payroll of a simple example to demonstrates the use of PB Ruhe in DATAWINDOW Lie of a modified form of control.

Basic payroll as follows:
Code name variable working hours of the basic wage wage wage jobs pay subsidized intellectuals
code name workdata basesa movesa stationsa bt othersa
char varchar char decimal decimal decimal decimal deciaml

There are two ways in PB can control the column attribute, one static, the other is dynamic ways. The so-called static approach is adopted in the column attribute option to achieve. Way is to use the so-called dynamic programming. Are introduced respectively:

First, the static method

(1) select a column in the datawindow MOUSE right after the point, select "properities" pops up after the system, a label, select "Edit" tab to "Display Only" option to the system to have more;
(2) or select the "Expression" tab, in the "Protect Express" fill in "1";
(3) or select the "Expression" tab, in the "Protect Express" fill in conditional expressions, such as working hours, staff can not be changed less than one year, then write "if (daysafter (date (workdate), today () ) <= 365,1,0) ";
(4) in datawindow in the value of a column of the Tab Order system to 0, the column due to lack of focus and not be modified;
(5) in the DataWindow Painter state Select Rows menu, then select the Update Properties, pop Specify Update Properties dialog box, set the Allow Updates empty.

Second, the dynamic modification method

(1) set for the protection of the entire Datawindow way: Using DataWindow Object The ReadOnly property can be set for the protection of the Datawindow way.
The syntax is: dw_1.Object.DataWindow.ReadOnly = value or dw_1.Modify ("DataWindow.ReadOnly (= value)"), including: value that Datawindow is read-only (read-only) state, it has two values : Yes and No. Yes that makes Datawindow as read-only; No on the contrary, the default value is No. For example: If you want Datawindow set to conservation, the corresponding event in the script contains the following code:
dw_1.Modify ("DataWindow.ReadOnly = Yes") or as:
dw_1.Object.DataWindow.ReadOnly = Yes
(2) protects only certain columns Datawindow
Method 1: Use column Protect property
The syntax is: dw_1.Object.name.Protect = integer or dw_1.Modify ("columnname.Protect (= integer)").
Parameter Description: cloumnname: In order to protect the column names; integer: the column to protect the state, a value of 0 or False when the column is not protected; value of 1 or True, the column is protected. For example, to set the column name to protect the state, the corresponding code: dw_1.Object.name.Protect = 1 or to: dw_1.Moidfy ("name.Protect = 1")
Method 2: Use column TabSequence property, in the program execution as needed TabOrder the column is set to 0, so as to achieve the purpose of protection.
The syntax is: dw_1.Object.name.TabSequence = number or dw_1.Modify ("columnname.TabSequence (= number)")
Parameter Description: columnname: to protect the column names; number: the column TabOrder value (0-32000).
For example, to set the column name to protect the state, the corresponding code:
dw_1.Object.name.TabSequence = 0
Or: dw_1.Modify ("name.Tabsequence = 0")
Method 3: Using the modified column ED99v properties DisplayOnly property values.
The syntax is: dw_1.Object.columnname.Edit.DisplayOnly = value or dw_1.Modify ("columnname.Edit.DisplayOnly (= value)")
Parameter Description: columnname: to protect the column names;
value: that the column is to show only (DisplayOnly) state, it has two values: Yes and No. Yes that does not allow the user to enter data (display only): No, by contrast, the default value is No.
For example: if the column name is set to only show events in the corresponding script contains the following code:
dw_1.Object.name.Edit.DisplayOnly = Yes
Or: dw_1.Modify ("name.Edit.DisplayOnly = Yes")
Although not with this method can be modified when the column but the column will be the focus of these other methods can not.

Third, selective protection of certain lines

DataWindow above methods will work for all lines, but to protect only some of these lines, you need to use the column to protect (Protect) attributes (values with the above method 2), but this is achieved in the establishment when the DataWindow . Methods: the DataWindow Sketchpad (Painter), double-click the appropriate column, the pop-up Column Object dialog box, select the Expressions page, write in the box after Protect if (conditional expression, 1,0). Flexible use of conditional expression can get a variety of protective effect.
(1) only allows to modify the new row inserted
In a DataWindow, sometimes there is a demand: do not allow the existing data can only browse changes, only the data entered by the user before allowing the new changes, then the expression is:
if (isrownew (), 0,1), or if (not isrownew (), 1,0)
(2) the protection of a column other columns according to the data
Such as staff salaries management, more than 5 years of work experience only when allowed to enter the intellectual subsidies (bt), bt the Protect are shown after the box: if (integer (mid (string (today (), 'yyyymmdd '), 1,4)) - integer (mid (workdata, 1,4))> 5,0,1)
(3) to protect the line can be determined only at execution time, and changing the management of such wages, assuming that only the wages of wage changes is change the input by, and generally only in the implementation of the conditions need to be established a variable, which requires the establishment of DataWindow data when a search for the specified parameters (such as the flag), then the column can be modified after the box Protect (user_name is the DataWindow in a, on behalf of the importer's name) :
if (user_name = flag, 0,1)
Also note that in practical applications the actual type parameters.
(4) add a flag in the table column
Basically, these methods require the line to protect certain rules to follow, no rules when these lines when the corresponding table in a marked increase in the specific column (set out name flag), values of 1 and 0, Protect in the other column and then the box directly after the flag of the expression. Run-time if the line flag = 1, the corresponding column in the bank is protected. Column value for the flag amendment, by the data administrator to modify or under certain circumstances flexibility in the program settings.







Recommended links:



Motorola Recall: a beautiful mistake



Custom programming of the intercept keystrokes VB.NET control action



Wave Of Mergers BI Have A Happy Life



"Staying Princess" Mercenary Information Finished



Report ASP And PHP



MKV to iPod



Reviews Covert Surveillance



ASF CONVERTER



Establish OSPF ADJACENCY relationships in



quot spore this application has failed to START



What rod DEALER outlets



In October 2007 The Sixth New York International Outsourcing Exhibition



VOB to MP4



25 comments:

  1. I think the admin of this website is truly working hard for
    his website, since here every data is quality based
    stuff.

    Here is my site: raspberry ketone diet

    ReplyDelete
  2. Good write-up, I’m regular visitor of one’s website, maintain up the

    excellent operate, and It is going to be a regular visitor
    for a long time.

    my blog ... http://eensm.org/oxwall/link/12699

    ReplyDelete
  3. The next time I learn a weblog, I hope that it doesnt disappoint me as much
    as this one. I mean, I know it was my option to read, but I

    truly thought youd have one thing attention-grabbing to say.

    All I

    hear is a bunch of whining about one thing that you may repair if you werent too busy in search of attention.



    Also visit my web page ... osborne group spain

    ReplyDelete
  4. This piecе of wгiting is trulу а plеasant
    οne it assists nеw net users, who arе ωishing
    fοr blogging.

    Αlso viѕіt my web site; reputation management

    ReplyDelete
  5. In fact no matter if someone doesn't understand after that its up to other people that they will assist, so here it happens.



    http://www.surrenderat20.net/2013/04/lissandra-and-three-new-freljord-skins.html

    Feel free to surf to my web-site - Raspberry ketone

    ReplyDelete
  6. What's up, after reading this awesome post i am also delighted to share my knowledge here with friends.

    my website Pure garcinia cambogia review

    ReplyDelete
  7. Card Debt Relief plan is a reliable alternative. This in
    turn may propel them to obtain a loan except in certain
    instances where a lender specializes in poor credit card debt
    relief and is looking for such borrowers.

    my weblog: help with debt

    ReplyDelete
  8. Card Debt Relief plan is a reliable alternative. This in turn may propel them to obtain a loan except in certain instances where a
    lender specializes in poor credit card debt relief and
    is looking for such borrowers.

    Visit my blog post; help with debt

    ReplyDelete
  9. All these may look trivial to you now, but, there are quite many factors which will
    affect the Cheap Online Car Insurance Quote premium in
    half. The" fraud mill" simply asked the participants
    to sign insurance forms, which would later be submitted to insurance companies
    struggling to meet investment targets, said Thomas Mercein, global
    head cheap online car insurance quote of debt capital markets at J.
    It seems like the car manufacturers, insurance companies will do everything to protect their
    insured clients. Moreover, because it is a personal or a friend's car.

    Here is my blog post ... car insurance ()

    ReplyDelete
  10. She might develop fine, thin hair over the body called lanugo hair.
    Click here to get Paco Rabanne 1 Million!

    Here is my homepage - how do you get a girlfriend

    ReplyDelete
  11. Or maybe she makes strict rules about how many times I ruined a relationship with a married guy who owns a promising wealth.

    Take pride in how you go about finding your own style to charm the pants off every
    lady you meet? I ran across I used to share with you the great
    quotes, I need to know what to say, just ask her!

    Visit my web page: how to attract beautiful women

    ReplyDelete
  12. Post writing is also a excitement, if you be acquainted
    with after that you can write or else it is difficult to write.


    Here is my web-site: initial Time (kspd.ks.Ac.kr)

    ReplyDelete
  13. I quite like looking through a post that will make men and
    women think. Also, many thanks for allowing for me to
    comment!

    My page ... szyby Do kuchni Poznań

    ReplyDelete
  14. These are in fact impressive ideas in on the topic
    of blogging. You have touched some good points here. Any way keep up wrinting.


    Also visit my homepage: how do you take garcinia cambogia

    ReplyDelete
  15. Having really outstanding օѵеr at scrabble requirements learning аll those simple
    methods ɑnd սsing tҺese pesople іn eaach and еѵery sport.
    1 previus method іn which Ӎy partner and i'deborah personaly claim tҺаt ʏoս'll
    be аble to boost սp yߋur vocabulary iis tο truth be told, start
    оff studying the thesaurus. An electric sport employs consumer electronics tߋ maқе thhe interactive sound-graphicor еven 3d images ѕystem,
    providing players havіng a energetic along witɦ involved experience.


    Alsߋ visit my site - scrabble game download

    ReplyDelete
  16. It's in reality a great and useful piece of information. I'm glad that you simply
    shared this useful information with us. Please stay us informed like this.
    Thanks for sharing.

    Also visit my homepage :: Iron force Hack

    ReplyDelete
  17. I am now not sure the place you are getting your
    info, however great topic. I needs to spend a while learning more or working out more.
    Thanks for magnificent info I was looking
    for this info for my mission.

    my web blog best bed bug killer

    ReplyDelete
  18. We are a group of volunteers and opening a new scheme in our community.

    Your website provided us with valuable information to work on. You have done a formidable
    job and our entire community will be grateful to you.


    My website basement renovation ideas (www.homeimprovementdaily.com)

    ReplyDelete
  19. Hi there, this weekend is fastidious in support of me, as this occasion i am reading this wonderful informative paragraph here at
    my house.

    Feel free to visit my web site - Shipping From Usa To Canada Langley

    ReplyDelete
  20. of valuableness nowadays.Get Top Tips And proposal On Juicing Fruits And Veggies Through Juicing crunchy fruits and
    vegetables that you are search for. reckon your position and the foeman. You motivation to awareness overwhelmed with the air vertically as peaky steroid
    alcohol can origin you to set up these two numbers. oakley sunglasses uggs black friday prada outlet hermes birkin custom t-shirts celine bags canada goose jackets coach outlet store Air max
    oakley sunglasses
    ray ban sunglasses Borse Louis Vuitton coach outlet marc jacobs outlet coach outlet chanel handbags ugg boots
    canada goose jackets cheap jerseys michael kors cyber Monday mac makeup wholesale marc jacobs outlet chi flat iron you
    are encouraging you by claiming discounts. line up out everything
    from boosting up your skills in parliamentary procedure
    to inventor a job. apparel source when it does put your ad hominem cash in hand, if
    you are massaging decide be travel extraneous the box anonymously
    and reducing that be, it is in

    my page :: kevin durant shoes

    ReplyDelete
  21. a sure quantity, or ask play them to change stronger and national leader fun.
    Don't let ballgame engage over your cite wit to acquisition a life security to a field game actor you get a higher thrown payment as good,
    much as cruciferous vegetable, apricots, time unit peppers to
    your own sense modality and you Polo Ralph Lauren Hermes Birkin Beats By Dr Dre Mac Cosmetics Wholesale
    Lululemon Outlet Prada Handbags Outlet Polo Ralph Lauren Polo Ralph Lauren Christian Louboutin Outlet Online Christian Louboutin Outlet Mulberry Bags Prada Handbags Hermes Outlet Moncler Outlet Chi Flat iron Kate Spade Outlet Cheap UGGs Boots
    Nike Air Max
    Chanel Outlet Moncler Outlet Gucci Outlet Celine Bag Jimmy Choo Shoes Online Christian Louboutin Outlet Celine Outlet the
    lucidness? the cut? informed the cost that are available.
    inferior of the surroundings. To pull ahead credibility,
    do not take over to use your expertise finished online
    coupons. When it comes to treating hemorrhoids at living accommodations.
    This is specially in effect for those trustworthy. These tips
    should exploit to insure you don't know.

    Here is my site - Marc Jacobs Outlet

    ReplyDelete
  22. Plus measurement ladies as well as men are given extensive number of choices for plus dimension wardrobes which are up
    to date in model. Some individuals may appear to search
    out it laborious however truly online looking for plus measurement clothing
    is kind of simple. In addition, plus size clothing contributed
    to significantly excessive revenues of attire shops and boutiques immediately.
    This underwater world has massive assortment of marine life that tempts nice
    number of tourists from each nook and nook of the world, all the 12 months round.

    Residence to superb marine life it is sort of a heaven that displays
    the awe-inspiring great thing about the world beneath the seas.



    Visit my webpage ... my pham

    ReplyDelete
  23. I think this is one of the most vital info for me. And
    i am glad reading your article. But want to remark on some general things,
    The web site style is great, the articles is really
    excellent : D. Good job, cheers

    my web-site: E Liquid

    ReplyDelete
  24. Fantastic goods from you, man. I've understand your stuff previous
    to and you're just extremely fantastic. I really like what you have acquired here, certainly like what you are saying and the way
    in which you say it. You make it entertaining and you still take care of to
    keep it smart. I can not wait to read far more from you.
    This is really a wonderful site.

    My webpage ... make online; ,

    ReplyDelete