0

Need a Constrain

Sorry to bother Fred, I need the constrain for WBS level 5, and. I sent you a mochet.

Thanks 

18 replies

null
    • Rafael Sanchis
    • Rafael_Sanchis
    • 1 yr ago
    • Reported - view

    The Constrain in Level 3 is : a.'Level-2' = b.mainCategory is OK

    The Constrain in Level 4 is : a.'Level-3' = b.'Level 3' is OK

    The Constrain in Level 5 is : a.'Level-4' = b.'Level 4' not work. 

    • Fred
    • 1 yr ago
    • Reported - view

    The sample you sent does not have the WBS_5 table. Can you upload another one?

    • Fred
    • 1 yr ago
    • Reported - view
    Rafael said:
    The Constrain in Level 5 is : a.'Level-4' = b.'Level 4' not work. 

     Double check that you have the correct field in the b section. There is no 'Level 4' field in the WBS_5 table. There is a WBS_4 field.

      • Rafael Sanchis
      • Rafael_Sanchis
      • 1 yr ago
      • Reported - view

      Fred 👍Ready Thanks Fred

    • Rafael Sanchis
    • Rafael_Sanchis
    • 1 yr ago
    • Reported - view

    Fred is there a way to protect each of this Level, it is very easy to modify by mistake.

    Thanks

      • Fred
      • 1 yr ago
      • Reported - view

      Rafael one way is to create a yes/no field, and put a formula that checks for true/false in the writable section of the fields you want to control.

    • Alan_Cooke
    • 1 yr ago
    • Reported - view

    To lock records I use this process.

    1.  Create a button to unlock a record with this in On Click:

    do as server
        for i in (select 'YourTableName')[LOCKED = true or LOCKED = null] do
            i.(LOCKED := false)
        end
    end;
    alert("All records unlocked")

     

    2.  Create another button to lock a record with this in On Click:

    do as server
        for i in (select 'YourTableName')[LOCKED = false or LOCKED = null] do
            i.(LOCKED := true)
        end
    end;
    alert("All records locked")

     

    Note:  The above locks ALL records in 'YourTableName'

    For each of these buttons I use a lock/unlock emoji 

    I have a Windows PC and use Win+; to find an emoji.

    3.  Create a Yes/No field named 'LOCKED'.  This allows me to Lock/Unlock a single record and is triggered by the above.  The code in 1 and 2 above toggles the LOCKED - Yes/No field.

    4.  In every field I want to respond to the Locked status I have added this "not LOCKED" (omit "") in the Writable If condition.

    5.  As a safety measure I also have added the code in point 2 (without the alert) to the Trigger after hide parameter of the TAB for the form.  This of course assumes you have a TAB as the first element of your form (I do so I can have a background colour for TABS)

     

    Hope that helps.

      • Alan_Cooke
      • 1 yr ago
      • Reported - view

      Alan Cooke One last thing.  I have the two buttons side by side and use the display if element to have either one or the other visible.  So when records are locked Unlock shows and vice versa.  Works a treat.

      • Rafael Sanchis
      • Rafael_Sanchis
      • 1 yr ago
      • Reported - view

      Alan Cooke Thanks Alan 👍

      • Alan_Cooke
      • 1 yr ago
      • Reported - view

      Rafael You are welcome.  How it looks
       

       

      • Rafael Sanchis
      • Rafael_Sanchis
      • 1 yr ago
      • Reported - view

      Alan Cooke Hi Alan sorry you have a Mocket, maybe I'm doing something bad and don't work. Thanks

      • Alan_Cooke
      • 1 yr ago
      • Reported - view

      Rafael What does not work?  Can you post the code you have used?

      • Rafael Sanchis
      • Rafael_Sanchis
      • 1 yr ago
      • Reported - view

      Alan Cooke Is on Table Documents. I place the two button with your code, and the yes/no 

      • Alan_Cooke
      • 1 yr ago
      • Reported - view

      Rafael I see that Level 1 - 3 do not respond which puzzled me but I think I have figured out what the issue is.  These 3 levels are in fact "windows" into the 3 tables they link to.  Therefore I would suggest you try using the locking code on one of these tables to confirm that once locked you can no longer make a radio button selection from the Documents table.

      Or another work around is to used 'not Locked' on 'display if' and use either a view or formulae to display the info in the three radio button child tables (Level 1 -v3).  In other words the 3 levels are displayed when not locked but not displayed when locked and the view/formula is displayed when locked and not displayed when not locked.  Effectively you are toggling the display of Levels 1- 3/view or formulae via the Display if locked/not locked.

      Make sense?

      • Alan_Cooke
      • 1 yr ago
      • Reported - view

      Alan Cooke Edit!  - I do mean the radio button Level fields at the bottom - Level 1 - 3 is misleading, sorry

      • Rafael Sanchis
      • Rafael_Sanchis
      • 1 yr ago
      • Reported - view

      Alan Cooke Don' worry Alan. Thanks

      • Rafael Sanchis
      • Rafael_Sanchis
      • 1 yr ago
      • Reported - view

      Alan Cooke Hi Alan the  button Level is to create a Work Breakdown Structure (WBS) for a project. Thanks.

Content aside

  • Status Answered
  • 1 yr agoLast active
  • 18Replies
  • 148Views
  • 3 Following