Results 1 to 4 of 4

Thread: Displaying Custom text based on grid value - Alpha Anywhere

  1. #1
    Member
    Real Name
    Tim Barker
    Join Date
    May 2013
    Posts
    63

    Default Displaying Custom text based on grid value - Alpha Anywhere

    I have a database that contains a status code. I would like to display in my grid a user-friendly status rather than the status code. So if the code in the DB is 1, I'd like to display Open in the grid rather than 1. If the code is 2, I'd like to display Closed in the grid rather than 2. I currently have the status code defined in the grid as a Label. I'm not sure how to condition the Status that is displayed based on the status code coming from the database.

    Thanks,

    Tim Barker

  2. #2
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,105

    Default Re: Displaying Custom text based on grid value - Alpha Anywhere

    I think you need to ask that in the appropriate place.
    If the grid in in a Desk top, try the desktop area, if it's in a web app, try the web side.
    Ted Giles
    Example Consulting - UK
    .

    https://exampleltd.example-software.com/
    See our site for Alpha Support, Conversion and Upgrade.

  3. #3
    Moderator
    Real Name
    James A. Talbott, Jr.
    Join Date
    Apr 2000
    Location
    Versailles, KY
    Posts
    1,395

    Default Re: Displaying Custom text based on grid value - Alpha Anywhere

    Why don't you create a "calculated" field in the grid query based on the value from the database. You can use a case statement and give the field an alias, then display that aliased field on the grid.

    Hope that helps.
    Jay
    Jay Talbott
    Lexington, KY


  4. #4
    Member
    Real Name
    Sean OKelly
    Join Date
    Sep 2015
    Location
    Charleston, WV
    Posts
    134

    Default Re: Displaying Custom text based on grid value - Alpha Anywhere

    What Jay suggested is good. Another way is to modify your query on the database side of things so that it returns what you want without having to do anything in Alpha. Typically this is done by creating a "view".

Similar Threads

  1. Displaying a Calculated Field based on a Stored Value
    By Purvi in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 05-18-2011, 11:59 AM
  2. Displaying Images in custom field (source is outside webroot folder)
    By mstricky in forum Application Server Version 10 - Web/Browser Applications
    Replies: 26
    Last Post: 05-04-2011, 06:03 PM
  3. Custom control on grid based on date field
    By George Corder in forum Web Application Server v7
    Replies: 19
    Last Post: 05-19-2006, 06:43 AM
  4. Display Record Based on TEXT typed in Text Box
    By Neomagnus in forum Alpha Five Version 7
    Replies: 10
    Last Post: 11-21-2005, 09:38 PM
  5. Set based form not displaying data
    By gcaplan in forum Alpha Five Version 6
    Replies: 1
    Last Post: 07-04-2005, 08:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •