I want open when Value Yes/No

Discussion in 'Free Source Codes' started by Rohit Khedar, Mar 10, 2020.

    
  1. Rohit Khedar

    Rohit Khedar Member


    I want Open when Value Yes/no But not open report and menu so what mistk me plz hlp me

    [#Part: CMP TallyShopFeatures Left]
    Line : RTC TDL Enable, RTC TDL Pass

    [Line: RTC TDL Enable]
    Field : Long Prompt, Logical Field
    Local : Field : Long Prompt : Set as : "Enable TDL Security ?"
    Local : Field : Logical Field : Storage : RTCEnable

    [Line: RTC TDL Pass]
    Field : Long Prompt, RTC TDL Password
    Local : Field : Long Prompt : Set as : "Set Password to Open TDL Configuration :"
    Local : Field : Long Prompt : Indent : 2
    ;Local : Field : Names Field : Storage : RTCPassword
    ;Local : Field : Names Field : Width : 10
    ;Local : Field : Names Field : Validate : NOT $$IsEmpty:$$Value
    Local : Field : Default : Inactive : NOT $RTCEnable

    Space Top : .2


    [Field: RTC TDL Password]
    Use : Name Field
    Case : Normal
    Storage : RTCPassword
    Width : 10
    Set Always: Yes
    Maximum : 20
    Validate : NOT $$IsEmpty:$$Value
    ASCIIOnly : Yes

    [System: UDF]
    RTCEnable : Logical : 1001
    RTCPassword : String : 1002


    [#Button: Change Configuration]

    Key : F12
    ;Action : Menu : Configuration ;; I want Open when Value No
    ;Action : Alter : RTC TDLReport ;; I want Open when Value Yes

    Title : $$LocaleString:"Configure"
    Action : CALL : RTC TDL Config


    [Function: RTC TDL Config]

    01: If: NOT $RTCEnable:$$Value
    02: Menu : Configuration
    03: Else

    04: If: $RTCEnable:$$Value
    05: Alter : RTC TDLReport

    06: End If

    07: End If
     


  2. Rohit Khedar

    Rohit Khedar Member


    any expert solvd plz my above code I want Open when Value Yes/no But not open report and menu so what mistk me plz hlp me
     


  3. balajimg

    balajimg Active Member


    Your function should first ask the user to enter some value and then compare that with the existing one

    for eg. :

    [Function: RTC TDL Config]

    00: Alter : Check RTC Config

    01: if : #CheckRTCConfig = $RTCPassword:Company:##SVCurrentCompany ;; If: NOT $RTCEnable:$$Value
    02: Menu : Configuration
    03: Else

    05: Alter : RTC TDLReport

    06: End If

    07: End If

    [Report : Check RTC Config]
    Form : Check RTC Config
    [Form : Check RTC Config]
    Part : Check RTC Config
    [Part : Check RTC Config]
    Lines : Check RTC Config
    [Line : Check RTC Config]
    Fields : Check RTC Config
    [Field : Check RTC Config]
    Use : Name Field
    Set as : $$value
     


  4. Rohit Khedar

    Rohit Khedar Member


    Thanks balajimg# this code is my full code so chack plz

    [#Part: CMP TallyShopFeatures Left]
    Line : RTC TDL Enable, RTC TDL Pass

    [Line: RTC TDL Enable]
    Field : Long Prompt, Logical Field
    Local : Field : Long Prompt : Set as : "Enable TDL Security ?"
    Local : Field : Logical Field : Storage : RTCEnable
    [Line: RTC TDL Pass]
    Field : Long Prompt, RTC TDL Password
    Local : Field : Long Prompt : Set as : "Set Password to Open TDL Configuration :"
    Local : Field : Long Prompt : Indent : 2
    ;Local : Field : Names Field : Storage : RTCPassword
    ;Local : Field : Names Field : Width : 10
    ;Local : Field : Names Field : Validate : NOT $$IsEmpty:$$Value
    Local : Field : Default : Inactive : NOT $RTCEnable

    Space Top : .2
    [Field: RTC TDL Password]
    Use : Name Field
    Case : Normal
    Storage : RTCPassword
    Width : 10
    Set Always: Yes
    Maximum : 20
    Validate : NOT $$IsEmpty:$$Value
    ASCIIOnly : Yes
    [System: UDF]
    RTCEnable : Logical : 1001
    RTCPassword : String : 1002
    [#Button: Change Configuration]
    Key : F12
    ;Action : Menu : Configuration ;; I want Open when Value No
    ;Action : Alter : RTC TDLReport ;; I want Open when Value Yes
    Title : $$LocaleString:"Configure"
    Action : CALL : RTC TDL Config
    [Function: RTC TDL Config]

    01: If: NOT $RTCEnable:$$Value
    02: Menu : Configuration
    03: Else

    04: If: $RTCEnable:$$Value
    05: Alter : RTC TDLReport
    06: End If

    07: End If

    [Report: RTC TDLReport]
    Title: $$LocaleString:"Enter Password for TDL Configuration"
    Form: RTC TDLForm
    Object: COmpany
    [Form: RTC TDLForm]
    Part:RTC TDLPart

    Horizontal Align: Centre
    Vertical Align : Centre
    Full Width : No
    No confirm : Yes
    Space Top : 0.2
    Space Bottom : 1
    SpaceLeft : 1
    SpaceRight : 1
    Background : @@SV_ADDONS ;@@SV_CMPCONFIG
    Option : Small Size Form
    [Part: RTC TDLPart]
    Line: RTC TDLsubTit, RTC TDLUserTit, RTC TDLPassTit

    [Line: RTC TDLsubTit]
    Field : Form SubTitle

    Local: Field: Form SubTitle: Info: $$LocaleString:"Lock / Unlock TDL Configuration"
    Local: Field: Form SubTitle: Style : Normal Bold Italic
    Local: Field: Form SubTitle: Color : " Blue "
    Space Top : 0.2
    Space Bottom: 1
    [Line: RTC TDLUserTit]
    Field: Short Prompt, RTC TDLUserField

    Local: Field: Short Prompt : Set as : "User Name"
    Local: Field: Default : Width : 15
    Local: Field: Default : Style : Normal Bold Italic
    [Field: RTC TDLUserField]
    Use: Name Field

    Set as : $$cmpusername:Company:##SVCurrentCompany ;; this not proper work
    ;Set as :$OwnerName:Company:##SVCurrentCompany

    Skip : Yes

    [Line: RTC TDLPassTit]
    Field: Short Prompt, RTC TDLPasswordField

    Local: Field: Short Prompt : Set as : "Password"
    Local: Field: Default : Width : 15
    Local: Field: Default : Style : Normal Bold Italic
    Space Top : 0.5
    [Field: RTC TDLPasswordField]
    Use : Name Field
    Case : Normal
    Storage : #RTCPassword
    Set Always: Yes
    Maximum : 20
    Validate : NOT $$IsEmpty:$$Value
    ASCIIOnly : Yes
    Sub Menu: Configuration:$$Value= #RTCPassword
     
    ch ruchitha likes this.


  5. ch ruchitha

    ch ruchitha Member



    Have you get it sir. Please send it if it is working fine.
     


Share This Page