Simplicty and flexibility!


Command::

value


Parameters


Returns/Result


Examples


Reference

value

Type

Command component

Purpose

The value keyword is a component of the case command syntax. When processing a case command, DataEase compares the expression that follows case to each of the statements specified by the keyword value in the order they appear in the script. When DataEase reaches the first true comparison, it executes all the actions between that value statement and the next.

If none of the specified value comparisons is true, DataEase executes the actions specified after the keyword others. As soon as all actions following any value or others statement are executed, processing passes to the first action following the end command for the case statement.

Syntax

case ( EXPRESSION)

 value COMPARISON 1 :

  ACTION SERIES 1 .

 [value COMPARISON 2 :

  ACTION SERIES 2 .

 .

 .

 value COMPARISON N :

  ACTION SERIES N . ]

 [others :

  DEFAULT ACTION SERIES . ]

end

 

Usage

The case command requires a case expression, one comparison value, and an end command. Subsequent value statements, actions, and the others keyword are optional. If others is used, it must follow all the specified comparison values.

Example

case ( current user name )

value "FRANK" :

call menu " SITE ADMINISTRATION " .

others :

call menu " MAIN MENU " .

end

 

This script tells DataEase: (1) If the current user is Frank, display the SITE ADMINISTRATION menu, and (2) if the current user is anyone other than Frank, display the MAIN MENU.

See Also


On the forum about value

setvalue getvalue

Following on from the 'Reporter' thread, which has gone haywire and is putting latest replies not at the bottom but in the middle of the thread!  I figured I'd start a new thread.I'm now having to learn QBM and ditch DQL as dataease no lon...

Product: Dataease [{8}]FIVE. Written by Simon B 09/09/14 at 15:31:40

Re:setvalue getvalue

The initial problem is that you have been advised to use the wrong function.If i am not mistaken Adrian took this from the top of his head and mixed them up. The format is the same but they do very different things. SetValue() and GetValu...

Product: Dataease [{8}]FIVE. Written by DataEase Tech Sup 09/09/14 at 15:55:42

Re:Re:setvalue getvalue

Ahaaaaaaa! it worked! :DSmug look for doing a qbm that works.  Only taken me 20 years ... :D  Soooooo, I can now do a report using qbm and a dql for the data entry form to get the variables (an entered start and end date for the repor...

Product: Dataease [{8}]FIVE. Written by Simon B 10/09/14 at 08:25:12

Show values in Headers/Footers

I thank you for your response, I have another challenge and this is it. I used dates to sort for records through a data-entry form (i.e. two sets of dates - using the operator "between" and "to") in a script, and i want the dates to appear only once...

Product: LegEasy 6 Windows. Written by Patrick 23/09/14 at 11:10:01

Re:Show values in Headers/Footers

The best way of doing is, is to put the values in a global variable and then retrieve them in a derivation in a virtual field in the headers/footers. in you DQL simply do something like this.Define "retval" text .retval:=SetAr...

Product: LegEasy 6 Windows. Written by DataEase Tech Sup. 23/09/14 at 11:11:00

Re:Re:Show values in Headers/Footers

Please show an example in  DE 8 (with field type in the header etc)thank you...

Product: LegEasy 6 Windows. Written by Rainer 23/09/14 at 11:38:38

Re:Re:Re:Show values in Headers/Footers

i got. it., you just have to Save the Skript before you can See the Data-entre filed in the Header...

Product: LegEasy 6 Windows. Written by Rainer 24/09/14 at 05:37:54

Re:Re:Show values in Headers/Footers

Thank you.I still have challenges with this, following your examples, the dates did not print rather it shows "Array" on the headers.  " In DE8 you will be able to list the data-entry values and insert them directly but in 6.x...

Product: LegEasy 6 Windows. Written by Patrick Ighive 05/10/14 at 15:14:09

Re:Re:Re:Show values in Headers/Footers

Dear Patrick!All the libraries are included in 6.53 but the distribution but the definition you need to include in your application is not.There is a lot of CDFs that was both available and necessary in DFW 5.x and 6.x and as the name...

Product: LegEasy 6 Windows. Written by DataEase Tech Sup 06/10/14 at 17:47:18

Re:Re:Re:Re:Show values in Headers/Footers

Thank you for your response, but your last directive on the downloading is not responding.  The response is 404 - Not Found...

Product: LegEasy 6 Windows. Written by Patrick Ighive 13/10/14 at 03:37:00

Re:Re:Re:Re:Re:Show values in Headers/Footers

We try again... ...

Product: LegEasy 6 Windows. Written by DataEase Tech Sup 13/10/14 at 11:12:58

setvalue

Can I, or How can I use setvalue in a Subform field....

Product: Dataease [{8}]FIVE. Written by Rainer 14/10/14 at 10:27:48

Re:setvalue

please answere...

Product: Dataease [{8}]FIVE. Written by Rainer 20/10/14 at 14:50:57

Re:setvalue

This is where the new policy of using our own products actively start to pay off....With the introduction of SetClass we opened Pandoras box. If one can do this on this kind of object one suddenly want to be able to do it on all kinds of objec...

Product: Dataease [{8}]FIVE. Written by DataEase 20/10/14 at 17:39:32

Re:Re:setvalue

Thank's. And what do I do if I want all the "MY Field" changed in the same way . Meens I have 1/n subrecords, and I want them all to get the value "KO" for examlpe?...

Product: Dataease [{8}]FIVE. Written by Rainer 20/10/14 at 19:05:53

Re:Re:Re:setvalue

please answere...

Product: Dataease [{8}]FIVE. Written by Rainer 29/10/14 at 18:49:34

Re:Re:Re:Re:setvalue

You have to run a loop that sets all the MYFields from 1 to n. Or you can do SetValue("MYField#1","KO")+SetValue("MYField#2","KO")+etc...To run a loop you need t use ExecDQL....

Product: Dataease [{8}]FIVE. Written by DataEase 30/10/14 at 07:11:09

Re:Re:Re:Re:Re:setvalue

can you please give an example for the loop.i can not do it this way ?retval := ExecDQL("for AUFTRAG_POSITION with Belegnr=data-entry Field1; setvalue("Belegart",global BART)+setvalue("Druck_KZ",global BART)",global Belegnr,"","","","")+...

Product: Dataease [{8}]FIVE. Written by Rainer 30/10/14 at 09:07:02

Re:Re:Re:Re:Re:Re:setvalue

Download Sample Firstly we need to get some basic rules in place.  "" is the delimiter of a string (text) in DataEase so you can't use " in...

Product: Dataease [{8}]FIVE. Written by DataEase 01/11/14 at 09:16:41

Summary Value Displayed Multiple Times in DE8.5

This is in version 8.5.When you print something like this;for AddressBook ;list recordsAmt : mean count .This prints multiple pages.But, if you change the script to something like this;for AddressBook...

Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 25/06/15 at 02:57:23

Re:Summary Value Displayed Multiple Times in DE8.5

Download Sample! Most likely a bug. To bad ;-) I think it is time you accept that there is a reason why this thing is being scrapped....

Product: Dataease [{8}]FIVE. Written by DataEase 25/06/15 at 10:14:20

Re:Re:Summary Value Displayed Multiple Times in DE8.5

I see that. It is pretty much like DFD.But, this will only work in 8.5 right?Do you recommend using this version in production? ...

Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 25/06/15 at 12:59:16

Re:Re:Re:Summary Value Displayed Multiple Times in DE8.5

Of course it only work in 8.5 and only in the last versions too ;-) I understand the question, for such a long time DFW was just a discovery and re-discovery of existing functionality but since the start of 8.0 we have ADDED functionality...

Product: Dataease [{8}]FIVE. Written by DataEase 26/06/15 at 09:09:18

Re:Re:Re:Re:Summary Value Displayed Multiple Times in DE8.5

Probably, I didn't ask the question right. What I mean was, if I release a converted (DFD to DE8.5) application to a client. After a while, does it stop working as it is beta still? And I have to update it for the latest version? In other...

Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 26/06/15 at 17:44:32

Re:Re:Re:Re:Re:Summary Value Displayed Multiple Times in DE8.5

GROUP is never timed, except when you use a Trial Key.The BETA developer is ALWAYS timed to make sure it goes out of circulation. We always compile a full version too which is not timed, but this is not "generally" available but w...

Product: Dataease [{8}]FIVE. Written by DataEase 28/06/15 at 10:16:18

Re:Re:Re:Re:Re:Re:Summary Value Displayed Multiple Times in DE8.5

That means I cannot deliver Beta developer version to my clients........

Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 29/06/15 at 19:47:45

2 times SetValue on a Button

Hallo Dataease Forum,have a little problem: Code like this on a Button:SetValue("MaterialVS",Typ) + SetValue("Preisqm",VK_Preis)This Button is inside a Subform. The Fields are listed in this Subform and i want to take...

Product: Dataease [{8}]FIVE. Written by grohmann.papier@t-online.de 12/12/15 at 16:32:22

Re:2 times SetValue on a Button

My guess would be that the field that doesn't work have a different Object name i.e. you have renamed the field.Object names is the same as the Field name on fields as long as you don't change the field name. Object names and Fiel...

Product: Dataease [{8}]FIVE. Written by DataEase 12/12/15 at 19:35:06

How to display an image based on a field value

We have created a table and a form. In the table, we have a field that contains the names of image files.How do we cause the actual image file to display on the form using the data(filename.jpg) for each reacord?...

Product: Dataease [{8}]FIVE. Written by Barry Peterson 12/01/16 at 18:55:39

Re:How to display an image based on a field value

Download Sample There is two ways to display and image based on field in DataEase 8.5...

Product: Dataease [{8}]FIVE. Written by DataEase 12/01/16 at 18:56:37

Issue with summed values line of output in Preview and Memo-AdvancedWebField

I have a procedure with 8 'item sum' fields and an output that is set for a landscape size, however, when I output to Preview or Memo-AdvancedWebField it drops some of the summed values, at the bottom of the report, to a second&nbs...

Product: Dataease [{8}]FIVE. Written by Rob Birney 10/03/16 at 11:31:53

Re:Issue with summed values line of output in Preview and Memo-AdvancedWebField

I gather the output is HTML?The "brilliance" of outputting to HTML into the WebField is that you can override any preset behaviour. The flow of the output is governed by the object and the styling set for the object.The styling...

Product: Dataease [{8}]FIVE. Written by DataEase 10/03/16 at 12:57:00

Hmmm... jsSetValue

Hmmm.. try to use jsSetValue .But how ever i try it ,it will not tranfer valiue from html to my Form.Do have anyone succsess with it ?I have orientetd me at the demoscript in the helpindex.Are there some new infos for it or...

Product: Dataease [{8}]FIVE. Written by grohmann.papier@t-online.de 25/03/16 at 15:02:06

Re:Hmmm... jsSetValue

Hi Markus.Sorry, you are just too enthusiastic.For documentation purposes we list the functions in the help file as we make then, and sometimes that means that the functions are listed there ahead of them being released.These f...

Product: Dataease [{8}]FIVE. Written by DataEase 28/03/16 at 13:35:06

SetValue + MultiChoice Drop Box

Dear All,Can I select an option of a Multichoice field ( built with a lookup funtion as a result of a relationship between two tables), using setvalue function?Please see attached example what I'm trying to doThe ideia is to...

Product: Dataease [{8}]FIVE. Written by afonso santos 22/06/16 at 22:42:53

Re:SetValue MultiChoice Drop Box

We are sorry, but we can't really grasp what you are trying to do.The Word Document is "muddled" so the image is only half showed and the text is also behind it. When uploading try to convert to image or even better, include a small applicatio...

Product: Dataease [{8}]FIVE. Written by DataEase 04/07/16 at 08:49:31

if with getvalue setvalue

I have two virtual fields "ok" and "ok1". In the derivation of "ok1"I have "if(GetValue("KDNR") = blank, SetValue("OK","N"), SetValue("OK","J"))".That sould bee updated with "refreshform"? The Record is not saved jet....

Product: Dataease [{8}]FIVE. Written by Rainer 06/09/16 at 15:00:49

Re:if with getvalue setvalue

Yes. Depends on the derivation of the Virtual Fields and the order of the fields.If the virtual fields that are set are after the one that "manipulate" them them derivation of the virtual fields will "trump" your attempts to set t...

Product: Dataease [{8}]FIVE. Written by DataEase 07/09/16 at 08:44:18

Listing lowest and highest values only.

Hi All, I was wondering if there is a way to list the two records with the lowest and highest values only? For example let’s say I had a table of various tire companies in the US and I want to find the two companies in the state of New York...

Product: Dataease [{8}]FIVE. Written by Bolt-on-Trailers 13/03/18 at 16:49:50

Re:Listing lowest and highest values only.

Plenty of ways to do this but we can do it the "hard core" way ;-) define "status" text . status := "Lowest" . for SomeData...

Product: Dataease [{8}]FIVE. Written by DataEase 13/03/18 at 19:34:07

Re:Re:Listing lowest and highest values only.

This is exactly what I was looking for. Thank you very much. Could we take it a step further though? Say there was another field for Gender and I wanted to only select all male customers?...

Product: Dataease [{8}]FIVE. Written by Bolt-on-Trailers 13/03/18 at 21:17:54

Re:Re:Re:Listing lowest and highest values only.

Simples..define "status" text .status := "Lowest" .for SomeData with Value = highest of somedata with gender= male value or value = lowest of somedata with gender= male value ;list recordsCustomerName ;S...

Product: Dataease [{8}]FIVE. Written by DataEase 14/03/18 at 08:47:05

Extract values from a Memo Field (all occurrence)

Hi DataEase,I need to extract the values from a memo field:any XXXXXXXX YYYYYYFor each occurrence I need to extract the 2 words following the word "any"How can I do?Example :fo...

Product: Dataease [{8}]FIVE. Written by Marco Marchesi 20/03/18 at 10:22:53

Re:Extract values from a Memo Field (all occurrence)

Download Sample We are currently working with the handicap that we are developing (and using) the next version of DataEase  (DE9) while we support in the last....

Product: Dataease [{8}]FIVE. Written by DataEase 20/03/18 at 12:02:15

Re:Re:Extract values from a Memo Field (all occurrence)

Great! (thanks also for the sample attached). It's a very good solution for a single DQL. But if I have to repeat the same operation for all the DQL present in the file. How can I do ? I already tried to run the procedure for every DQL saving the...

Product: Dataease [{8}]FIVE. Written by Marco Marchesi 22/03/18 at 13:47:22

Re:Re:Re:Re:Listing lowest and highest values only.

Good solution for only the highest value, but if I need to get the first 100 customers with the highest or lowest amount how can I do?...

Product: Dataease [{8}]FIVE. Written by Marco Marchesi 28/03/18 at 15:13:31

Re:Re:Re:Re:Re:Listing lowest and highest values only.

This is for highest and lowest....

Product: Dataease [{8}]FIVE. Written by DataEase 29/03/18 at 10:12:00

RecordSaveNew and erase field value in OML with just one button

Hi.Does anyone know how I can use just one button to execute two procedures as follows? When pressing the button, following events should occur:1. The Current record should be saved (save new record)2. Values in specified fields s...

Product: . Written by Daniel Kron 08/02/20 at 17:27:09

Re:RecordSaveNew and erase field value in OML with just one button

Hi DanielYou can do as follows:Button - Exceute function/derivationRecordSave() + SetValue() Refer to attached image.Hope this helpsRegardsJosef...

Product: . Written by Josef Vella 08/02/20 at 17:37:05

Re:Re:RecordSaveNew and erase field value in OML with just one button

Thank you Josef. It seem that this does not work in my version (DE6.52). My bad I didn´t write what version I am using. Sorry. Thank you anyway. Maybe you know how to do it in 6.52 (6.53)?Have a good daySincerely,//Daniel...

Product: . Written by Daniel Kron 09/02/20 at 10:41:15

Re:Re:Re:RecordSaveNew and erase field value in OML with just one button

DanielSample attached.  Not very elegant but it works.Take a look and let me know if this helps.regardsJosef...

Product: . Written by Josef Vella 09/02/20 at 19:55:00

Re:RecordSaveNew and erase field value in OML with just one button

Donwload Sample We have updated Josefs sample a little to show you how you can do this in OML.But for the love of GOD! This is absolute crap....

Product: LegEasy 6 Windows. Written by DataEase 10/02/20 at 17:57:43

System Configuration default values & temporary files folder

DE 8.5 System Configuration is quite a bit different to 6.53Apart from the obsolete locking strategy settings the "Temporary files" folder setting is not in 8.5With 6.53 the temp folder is important for RDS multi-user setup to be unique...

Product: Dataease [{8}]FIVE. Written by Sam Bird 25/07/22 at 13:21:39

Re:System Configuration default values

In de85 onwards the default temp catalogue for DataEase files is .\TEMP But this can be overridden by SET TEMP=...

Product: Dataease [{8}]FIVE. Written by DataEase 25/07/22 at 17:55:03

Re:Re:System Configuration default values

Thank you...

Product: Dataease [{8}]FIVE. Written by Sam Bird 25/07/22 at 18:43:24

On the blog about value

New Function in 8 - CHR() returns ASCII value for number. Long in comming.... (Ver 8.0.0.1143)

We continue to extend the function library in 8, and one functions that has been missing for "ever", has been CHR. It might be a programmers function, but after we introduced the new exciting Memo manipulation class the lack of this function become eve...

Product: Dataease [{8}]FIVE. Written by DataEase 11/10/12 at 07:07:45

New Function in 8 - GetCurrent() - Returns some long awaited values like AppPath, DePath and MyDoc (Ver. 8.0.0.1137)

DataEae has been a little "wobbly" on referencing external stuff like Images etc.There is an Imagepath in Application Preferences, but it has been rendered "defunct" so many times over the years, and nobody is really sure how it works anyway, s...

Product: Dataease [{8}]FIVE. Written by DataEase 26/09/12 at 07:53:14

New Function in 8 - MemoDecodePair() - Function to return the value from a encoded pair in Memo (Ver. 8.0.0.11.40)

This might be "greek" for the ones of you that hasn't followed us through the new MemoClass/WebField class project, but for those that have, this will be the last clue to the riddle. Over the last couple of months, you have been able to see Memo transfe...

Product: Dataease [{8}]FIVE. Written by DataEase 04/10/12 at 08:39:54

Re:New Function in 8 - CHR() returns ASCII value for number. Long in comming.... (Ver 8.0.0.1143)

To be honest, there is two things I have been struggling with finding (I just thought it was down to me being stupid and bad documentation), and that is how to insert extended character and how to get "" around texts. I am glad that it wasn't me being...

Product: Dataease [{8}]FIVE. Written by David Mills 01/11/12 at 16:25:44

New Function in 8 - ToText() - Converts any DataEase field/function value to Text (Ver 8.0.0.1171)

A lot of our seasoned developers know that what you see is not always what you get. Internally DataEase converts values freely between formats, but not always. Especially when you use functions and allocated fields directly you might get peculiar resul...

Product: Dataease [{8}]FIVE. Written by DataEase 30/11/12 at 07:32:37

New Function in 8 - SetValue() - Setting a value in any field from a button or another field (Ver. 8.0.0.1177)

The new Set functionality have now come full circle with SetValue().Traditionally DataEase functions have been limited to being just that...functions i.e. something that do a job and return the result.In DataEase 6.x we introduced a sc...

Product: Dataease [{8}]FIVE. Written by DataEase 12/12/12 at 16:28:32

Re:New Function in 8 - ToText() - Converts any DataEase field/function value to Text (Ver 8.0.0.1171)

Can I have serial # for Dataease 8 Trial Ver. please...

Product: Dataease [{8}]FIVE. Written by Wahid DeWan 13/12/12 at 23:36:59

Re:Re:New Function in 8 - ToText() - Converts any DataEase field/function value to Text (Ver 8.0.0.1171)

Sorry, there is no trial serial for DataEase 8 at the moment....

Product: Dataease [{8}]FIVE. Written by DataEase 16/12/12 at 19:41:35

New Function in 8 - StringBetween() - Cut out the string between to search values. (Ver. 8.0.0.1201)

This function is the last of a triumvirate consisting of StringTo(), StringFrom() and now StringBetween().Between them they will be able to chop up any string exactly like you want it.StringBetween is like and XOR of the two other o...

Product: Dataease [{8}]FIVE. Written by DataEase 16/01/13 at 14:32:16

New Function in 8 - SetMemoValue() - GUI function that push a value into a Memo (Ver. 8.0.0.1280)

Sorry folks. Too much to do and too little time to do it so this blog entry is a little delayed...This is the complementary function to SetValue() for normal fields and again the complementary function for the PRISM functio...

Product: Dataease [{8}]FIVE. Written by DataEase 08/05/13 at 13:39:21

New Functions in 8 - MemoSetGlobal()+MemoGetGlobal() - Global array of memo values (8.0.0.1287)

We have now reached 19 Memo specific functions...puh!Memo has come to it's own in 8 and it is a little funny as they were so reviled in 7.Anyways...We and our 8 users have now used the different memo functions fo...

Product: Dataease [{8}]FIVE. Written by DataEase 08/05/13 at 13:56:09

Update Functionality DataEase 8 - SetValue(), SetState(), SetColor(), SetFocus() ObjectNumber Added (Ver 8.0.0.1306)

One challenge that has been present since OML was introduced and one could start to manipulate GUI object directly is to manipulate different Rows/Records in a Subform etc.Record objects in Subforms are clones, and hence don't have their own u...

Product: Dataease [{8}]FIVE. Written by DataEase 18/06/13 at 22:08:56

DataEase 8.5 - How to create a subform that change style on scroll/value in row.

Download Sample The solution is to manipulate the entire Subform when there is a scroll.&nbs...

Product: Dataease [{8}]FIVE. Written by DataEase 29/05/18 at 12:43:25


dg3_HelpView