Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


The best way to try/catch QA variable format


Recommended Posts

Hello there

May I ask some expereinced developer to give me a hint.

If my QA variable should be in a certain format,  ex. time format ("22:00"), what is the best way to control it, and not allow user to insert inapropriate format and notify him by some error message?

Is it even possible?

Thanks a lot for any help

 

Edited by Neo Andersson
Link to comment
Share on other sites

  • Topic Author
  • Button ? For QA variable ? Sorry, i dont understand, What button?

    Please login or register to see this attachment.

    You mean create a UI button for this?

    No i dont want to use extra UI elements. I need to check the inserted value in the textbox on the picture

    Edited by Neo Andersson
    Link to comment
    Share on other sites

    29 minutes ago, Neo Andersson said:

    You mean create a UI button for this?

    No i dont want to use extra UI elements.


    Yes, that was what I meant. If you don’t want to use the UI, that is ok. But is is a way to get the right values. 

    • Like 1
    Link to comment
    Share on other sites

    I don’t prevent wrong entry, but still try to make something out of it, upper or lower case, the right decimal character, etc. And if that doesn’t work, I ruthlessly ? use a default value as stated in the manual of the Quickapp ?

    • Like 1
    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...