4DToday.com
Transax Payment Processing for 4D
Home Directory Classifieds Reference Archives
Site Info
About 4DToday.com
Contact Us
Version française
Quote
Developers (704)
4D Developers (583)
Web Developers (328)
Tools Publishers (189)
Instructors (165)
Web Hosts (56)
Resellers (81)
Software Publishers (289)
Search Developers
Products (419)
Plug-Ins (123)
Components (61)
Code Libraries (9)
Books (9)
Tools (42)
Vertical Applications (146)
Search Products
User Groups
All User Groups (21)
Classified Ads (4)
Help Wanted (3)
Opportunities Wanted (1)
Hardware Wanted (0)
Hardware for Sale (0)
Software Wanted (0)
Software for Sale (0)
Other (0)
Resources
4D
4D, Inc.
4D International
4D Wiki
4D Partner Central
4D Beginner's Center
4D Online Documentation
4D 2004 Example Applications
4D Example Databases
4D BugDisplayer
4D, Inc. Training
Message Lists
4D Mailing Lists
4D Tech Google Group
iNUG Archives (Nabble)
iNUG Archives (Gmane)
iNUG Message Index
Other
4D Code Exchange
4D Resources
Sviluppo4D.it (Italy)
Quote
Some people have so much respect for their superiors they have none left for themselves.
Peter McArthur  
  Suggest a Quote  
Developer News
There are no news items at this time.
 Submit Future News    Archive 
Technical Tip
Use Abs Function To Set Pop-Up/Drop-Down Menus

When displaying a pop-up/drop-down menu on an input form, you need some code to check the value of the field represented by the menu and select the appropriate menu item. If the current value of the field isn't found in the array, then the array is often set to the first element as a default.

LIST TO ARRAY("Status";aStatus)
$element:=Find in array(aStatus;[Time_Slip]Status)
If($element>0)
   aStatus:=$element
Else
   aStatus:=1
End if


Since the Find in array function will return -1 if the field is not found in the array, we can use 4D's Abs function to eliminate the If test:

LIST TO ARRAY("Status";aStatus)
aStatus:=Abs(Find in array(aStatus;[Time_Slip]Status))
  Submit a Tip    Archive 
Spotlight
Canvas Plugin
Canvas Plugin Canvas Plugin for Macintosh and Windows, developed by Pluggers, provides you with a rich toolbox for drawing objects inside a plug-in area and adding interactivity to those objects. You'll need to check out this plug-in to see all that it can do for you.
  Suggest a Spotlight  
Survey Question
Today, we ask you...
Do you employ copy protection for your products?
3rd-party hardware solution
3rd-party software solution
Self-developed using 4D
Self-developed with other technology

Survey submitted by Jody Bevan
  Show Results (no vote)    Suggest a Survey  
Events
There are no events scheduled for the upcoming week.
  Submit an Event