Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

Empty field validation

(0) ShareShare
ReportReport
Posted on by 64

Is there any functions to calculate integer length / or empty

  • gaya3 killy Profile Picture
    gaya3 killy 64 on at
    RE: Empty field validation

    Thank You sir

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Empty field validation

    You need to find out why its not validating.

    What is the value returned on variable pinlength and reglength?

    Thanks,

    Girish S.

  • gaya3 killy Profile Picture
    gaya3 killy 64 on at
    RE: Empty field validation

    It is triggering when i call it from clicked. but its not validating

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Empty field validation

    Have you debugged the code?

    Does it go inside the if condition?

    Thanks,

    Girish S.

  • gaya3 killy Profile Picture
    gaya3 killy 64 on at
    RE: Empty field validation

    as i said there are 2 dialogs which are opened by buttons , initially i used to close the 1st dialog from 2nd dialog. but now i am closing the 1st dialog first and opening the second dialog through clicked method , but the can close method is not working. the screenshots are previously attached in another question.

    code :

    int pinlength,  reglength ;

           pinlength = strLen(int2Str(SecurityPINTmp.PIN));

           reglength = strLen(SecurityPINTmp.RegistrationID);

           if(pinlength == 0 || reglength == 0)

           {

               Error('@BM:BM0149');

               return false;

           }

    thanks.

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Empty field validation

    Which part is not working. Can you be more elaborate?

    Thanks,

    Girish S.

  • gaya3 killy Profile Picture
    gaya3 killy 64 on at
    RE: Empty field validation

    I Wrote 2  validations on canclose method but its not working. initially i was trying to close the form from 2nd dialog and i changed it . i am closing after clicking the button but its not working.

    thanks

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,552 Super User 2024 Season 1 on at
    RE: Empty field validation

    If you need validation on click of OK button in dialog then you can add your validation in if (dialog.closedOk()) loop.

    https://wp.me/p6FQUH-30

  • Verified answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Empty field validation

    You can add your validation on the CanClose method on the 1st dialog form.

    canClose returns boolean value.

    public boolean canClose()]
    {
        boolean ret;
        ret = super();
        //add your logic for integer validation
        if(int == 0)
        {
            ret= checkfailed("Warning");
        }
        return ret;
    }

    Thanks,

    Girish S.

  • gaya3 killy Profile Picture
    gaya3 killy 64 on at
    RE: Empty field validation

    I have a form on which when i click a button , it opens 1st dialog . the first dialogs has 2 fields when i click ok on 1st dialog it opens 2nd dialog . i need validation at 1st dialog that if fields are empty is shouldn't open second dialog. How can i achieve it ?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,817 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans