Conditional Values?

Conditional Values?

am 04.10.2007 22:27:23 von JayBee

Hi

I currently have 20 fields with the field format option button, at the
moment the buttons select a target field and input the relevant value
1-20 to indicate which repair code has been selected.

I need to export repair code data to a text file and the target
database uses different repair codes. Is there a way to convert the
values before export; Maybe using a lookup table or logical
algorithms?

For example using Visual Basic style coding
IF 3= True and 11 = True THEN
Store D56
IF 9 = True THEN
store D17

Maybe I could create a field to store the looked up value and then
select this field at the time of the export. I am just not sure how
to acheive the conditional value in Filemaker, is it possible?

Re: Conditional Values?

am 04.10.2007 23:29:20 von d-42

On Oct 4, 1:27 pm, JayBee wrote:
> Hi
>
> I currently have 20 fields with the field format option button, at the
> moment the buttons select a target field and input the relevant value
> 1-20 to indicate which repair code has been selected.
>
> I need to export repair code data to a text file and the target
> database uses different repair codes. Is there a way to convert the
> values before export; Maybe using a lookup table or logical
> algorithms?
>
> For example using Visual Basic style coding
> IF 3= True and 11 = True THEN
> Store D56
> IF 9 = True THEN
> store D17
>
> Maybe I could create a field to store the looked up value and then
> select this field at the time of the export. I am just not sure how
> to acheive the conditional value in Filemaker, is it possible?

define a new field, 'repaircode' as a calculation, and set the
calculation as:

case( 3=true and 11=true; d56;
9=true; d17;
"default to this text if nothing is true")

Obviously you'll have to clean up the calcluation a bit so that it
makes sense, but that's the general form to use...

-regards,
Dave

Re: Conditional Values?

am 05.10.2007 07:17:17 von JayBee

On Oct 4, 10:29 pm, d-42 wrote:
> On Oct 4, 1:27 pm, JayBee wrote:
>
>
>
>
>
> > Hi
>
> > I currently have 20 fields with the field format option button, at the
> > moment the buttons select a target field and input the relevant value
> > 1-20 to indicate which repair code has been selected.
>
> > I need to export repair code data to a text file and the target
> > database uses different repair codes. Is there a way to convert the
> > values before export; Maybe using a lookup table or logical
> > algorithms?
>
> > For example using Visual Basic style coding
> > IF 3= True and 11 = True THEN
> > Store D56
> > IF 9 = True THEN
> > store D17
>
> > Maybe I could create a field to store the looked up value and then
> > select this field at the time of the export. I am just not sure how
> > to acheive the conditional value in Filemaker, is it possible?
>
> define a new field, 'repaircode' as a calculation, and set the
> calculation as:
>
> case( 3=true and 11=true; d56;
> 9=true; d17;
> "default to this text if nothing is true")
>
> Obviously you'll have to clean up the calcluation a bit so that it
> makes sense, but that's the general form to use...
>
> -regards,
> Dave- Hide quoted text -
>
> - Show quoted text -

Cheers Dave

That's just the hint I needed. I'll have a bash at it this morning
and let you know how I get on.

Regards
Jenny

Re: Conditional Values?

am 05.10.2007 09:07:08 von JayBee

On 5 Oct, 06:17, JayBee wrote:
> On Oct 4, 10:29 pm, d-42 wrote:
>
>
>
>
>
> > On Oct 4, 1:27 pm, JayBee wrote:
>
> > > Hi
>
> > > I currently have 20 fields with the field format option button, at the
> > > moment the buttons select a target field and input the relevant value
> > > 1-20 to indicate which repair code has been selected.
>
> > > I need to export repair code data to a text file and the target
> > > database uses different repair codes. Is there a way to convert the
> > > values before export; Maybe using a lookup table or logical
> > > algorithms?
>
> > > For example using Visual Basic style coding
> > > IF 3= True and 11 = True THEN
> > > Store D56
> > > IF 9 = True THEN
> > > store D17
>
> > > Maybe I could create a field to store the looked up value and then
> > > select this field at the time of the export. I am just not sure how
> > > to acheive the conditional value in Filemaker, is it possible?
>
> > define a new field, 'repaircode' as a calculation, and set the
> > calculation as:
>
> > case( 3=true and 11=true; d56;
> > 9=true; d17;
> > "default to this text if nothing is true")
>
> > Obviously you'll have to clean up the calcluation a bit so that it
> > makes sense, but that's the general form to use...
>
> > -regards,
> > Dave- Hide quoted text -
>
> > - Show quoted text -
>
> Cheers Dave
>
> That's just the hint I needed. I'll have a bash at it this morning
> and let you know how I get on.
>
> Regards
> Jenny- Hide quoted text -
>
> - Show quoted text -

Hi Dave

I tried your calculation formula as suggested but the result section
e.g. D31, D17, Filemaker says that the specified field can not be
found which doesn't make sense because it is supposed to be a result
not an exisiting field.

Any ideas?

Thanks Dave.

Re: Conditional Values?

am 05.10.2007 09:12:54 von Vandar

JayBee wrote:

> On 5 Oct, 06:17, JayBee wrote:
>
>>On Oct 4, 10:29 pm, d-42 wrote:
>>
>>
>>
>>
>>
>>
>>>On Oct 4, 1:27 pm, JayBee wrote:
>>
>>>>Hi
>>
>>>>I currently have 20 fields with the field format option button, at the
>>>>moment the buttons select a target field and input the relevant value
>>>>1-20 to indicate which repair code has been selected.
>>
>>>>I need to export repair code data to a text file and the target
>>>>database uses different repair codes. Is there a way to convert the
>>>>values before export; Maybe using a lookup table or logical
>>>>algorithms?
>>
>>>>For example using Visual Basic style coding
>>>>IF 3= True and 11 = True THEN
>>>>Store D56
>>>>IF 9 = True THEN
>>>>store D17
>>
>>>>Maybe I could create a field to store the looked up value and then
>>>>select this field at the time of the export. I am just not sure how
>>>>to acheive the conditional value in Filemaker, is it possible?
>>
>>>define a new field, 'repaircode' as a calculation, and set the
>>>calculation as:
>>
>>>case( 3=true and 11=true; d56;
>>> 9=true; d17;
>>> "default to this text if nothing is true")
>>
>>>Obviously you'll have to clean up the calcluation a bit so that it
>>>makes sense, but that's the general form to use...
>>
>>>-regards,
>>>Dave- Hide quoted text -
>>
>>>- Show quoted text -
>>
>>Cheers Dave
>>
>>That's just the hint I needed. I'll have a bash at it this morning
>>and let you know how I get on.
>>
>>Regards
>>Jenny- Hide quoted text -
>>
>>- Show quoted text -
>
>
> Hi Dave
>
> I tried your calculation formula as suggested but the result section
> e.g. D31, D17, Filemaker says that the specified field can not be
> found which doesn't make sense because it is supposed to be a result
> not an exisiting field.
>
> Any ideas?

If D31, D17, etc are the actual values you want to appear in the field,
enclose them in quotes so they are recognized as text results and not
fields.

Re: Conditional Values?

am 05.10.2007 09:26:01 von JayBee

On 5 Oct, 08:12, Vandar wrote:
> JayBee wrote:
> > On 5 Oct, 06:17, JayBee wrote:
>
> >>On Oct 4, 10:29 pm, d-42 wrote:
>
> >>>On Oct 4, 1:27 pm, JayBee wrote:
>
> >>>>Hi
>
> >>>>I currently have 20 fields with the field format option button, at the
> >>>>moment the buttons select a target field and input the relevant value
> >>>>1-20 to indicate which repair code has been selected.
>
> >>>>I need to export repair code data to a text file and the target
> >>>>database uses different repair codes. Is there a way to convert the
> >>>>values before export; Maybe using a lookup table or logical
> >>>>algorithms?
>
> >>>>For example using Visual Basic style coding
> >>>>IF 3= True and 11 = True THEN
> >>>>Store D56
> >>>>IF 9 = True THEN
> >>>>store D17
>
> >>>>Maybe I could create a field to store the looked up value and then
> >>>>select this field at the time of the export. I am just not sure how
> >>>>to acheive the conditional value in Filemaker, is it possible?
>
> >>>define a new field, 'repaircode' as a calculation, and set the
> >>>calculation as:
>
> >>>case( 3=true and 11=true; d56;
> >>> 9=true; d17;
> >>> "default to this text if nothing is true")
>
> >>>Obviously you'll have to clean up the calcluation a bit so that it
> >>>makes sense, but that's the general form to use...
>
> >>>-regards,
> >>>Dave- Hide quoted text -
>
> >>>- Show quoted text -
>
> >>Cheers Dave
>
> >>That's just the hint I needed. I'll have a bash at it this morning
> >>and let you know how I get on.
>
> >>Regards
> >>Jenny- Hide quoted text -
>
> >>- Show quoted text -
>
> > Hi Dave
>
> > I tried your calculation formula as suggested but the result section
> > e.g. D31, D17, Filemaker says that the specified field can not be
> > found which doesn't make sense because it is supposed to be a result
> > not an exisiting field.
>
> > Any ideas?
>
> If D31, D17, etc are the actual values you want to appear in the field,
> enclose them in quotes so they are recognized as text results and not
> fields.- Hide quoted text -
>
> - Show quoted text -

Thanx

Re: Conditional Values?

am 08.10.2007 09:09:10 von JayBee

On 4 Oct, 22:29, d-42 wrote:
> On Oct 4, 1:27 pm, JayBee wrote:
>
>
>
>
>
> > Hi
>
> > I currently have 20 fields with the field format option button, at the
> > moment the buttons select a target field and input the relevant value
> > 1-20 to indicate which repair code has been selected.
>
> > I need to export repair code data to a text file and the target
> > database uses different repair codes. Is there a way to convert the
> > values before export; Maybe using a lookup table or logical
> > algorithms?
>
> > For example using Visual Basic style coding
> > IF 3= True and 11 = True THEN
> > Store D56
> > IF 9 = True THEN
> > store D17
>
> > Maybe I could create a field to store the looked up value and then
> > select this field at the time of the export. I am just not sure how
> > to acheive the conditional value in Filemaker, is it possible?
>
> define a new field, 'repaircode' as a calculation, and set the
> calculation as:
>
> case( 3=true and 11=true; d56;
> 9=true; d17;
> "default to this text if nothing is true")
>
> Obviously you'll have to clean up the calcluation a bit so that it
> makes sense, but that's the general form to use...
>
> -regards,
> Dave- Hide quoted text -
>
> - Show quoted text -

Dave

It worked, the only problem is that more than one repair code can be
true. For example 9, 3, 11 could be true in which case D17 and D31
would need to be stored in RepairCode. With the present code if 9, 3,
11 is selected D17 is stored in RepairCode becuase 9 was selected
first. The 9 needs to be enclosed in quotation marks to be recognized
as text. Is there anyway that you know of to acheive this?

Thanx in Advance!

Re: Conditional Values?

am 08.10.2007 12:29:43 von d-42

On Oct 8, 12:09 am, JayBee wrote:
> On 4 Oct, 22:29, d-42 wrote:
>
>
>
> > On Oct 4, 1:27 pm, JayBee wrote:
>
> > > Hi
>
> > > I currently have 20 fields with the field format option button, at the
> > > moment the buttons select a target field and input the relevant value
> > > 1-20 to indicate which repair code has been selected.
>
> > > I need to export repair code data to a text file and the target
> > > database uses different repair codes. Is there a way to convert the
> > > values before export; Maybe using a lookup table or logical
> > > algorithms?
>
> > > For example using Visual Basic style coding
> > > IF 3= True and 11 = True THEN
> > > Store D56
> > > IF 9 = True THEN
> > > store D17
>
> > > Maybe I could create a field to store the looked up value and then
> > > select this field at the time of the export. I am just not sure how
> > > to acheive the conditional value in Filemaker, is it possible?
>
> > define a new field, 'repaircode' as a calculation, and set the
> > calculation as:
>
> > case( 3=true and 11=true; d56;
> > 9=true; d17;
> > "default to this text if nothing is true")
>
> > Obviously you'll have to clean up the calcluation a bit so that it
> > makes sense, but that's the general form to use...
>
> > -regards,
> > Dave- Hide quoted text -
>
> > - Show quoted text -
>
> Dave
>
> It worked, the only problem is that more than one repair code can be
> true. For example 9, 3, 11 could be true in which case D17 and D31
> would need to be stored in RepairCode. With the present code if 9, 3,
> 11 is selected D17 is stored in RepairCode becuase 9 was selected
> first. The 9 needs to be enclosed in quotation marks to be recognized
> as text. Is there anyway that you know of to acheive this?

Depends really on what the actual logic looks like. There are a few
ways of doing this.

You can test for larger cases first before smaller ones:

e.g.

case(
9=true and 3=true, D13 & " " & D31
9=true; D13;
3=true; D31;
etc

if 9 and 3 are true it will match the first case and return both,
otherwise just one.

Or you can test for each value and join the results:

e.g.

if(9=true, D17 & " ", "") &
if(3=true, D31 & " ", "") &
if(2=true, D45 & " ", "")
etc

so if 9, 3, 2 were selected it would return the values of d17 d31 d45
if only 2 were selected it would return the value of d45 only, etc.

or you can use a combination of the two techniques... or maybe
something else... it REALLY depends on what the complete logic looks
like.

-Dave

Re: Conditional Values?

am 08.10.2007 17:36:55 von JayBee

On 8 Oct, 11:29, d-42 wrote:
> On Oct 8, 12:09 am, JayBee wrote:
>
>
>
>
>
> > On 4 Oct, 22:29, d-42 wrote:
>
> > > On Oct 4, 1:27 pm, JayBee wrote:
>
> > > > Hi
>
> > > > I currently have 20 fields with the field format option button, at the
> > > > moment the buttons select a target field and input the relevant value
> > > > 1-20 to indicate which repair code has been selected.
>
> > > > I need to export repair code data to a text file and the target
> > > > database uses different repair codes. Is there a way to convert the
> > > > values before export; Maybe using a lookup table or logical
> > > > algorithms?
>
> > > > For example using Visual Basic style coding
> > > > IF 3= True and 11 = True THEN
> > > > Store D56
> > > > IF 9 = True THEN
> > > > store D17
>
> > > > Maybe I could create a field to store the looked up value and then
> > > > select this field at the time of the export. I am just not sure how
> > > > to acheive the conditional value in Filemaker, is it possible?
>
> > > define a new field, 'repaircode' as a calculation, and set the
> > > calculation as:
>
> > > case( 3=true and 11=true; d56;
> > > 9=true; d17;
> > > "default to this text if nothing is true")
>
> > > Obviously you'll have to clean up the calcluation a bit so that it
> > > makes sense, but that's the general form to use...
>
> > > -regards,
> > > Dave- Hide quoted text -
>
> > > - Show quoted text -
>
> > Dave
>
> > It worked, the only problem is that more than one repair code can be
> > true. For example 9, 3, 11 could be true in which case D17 and D31
> > would need to be stored in RepairCode. With the present code if 9, 3,
> > 11 is selected D17 is stored in RepairCode becuase 9 was selected
> > first. The 9 needs to be enclosed in quotation marks to be recognized
> > as text. Is there anyway that you know of to acheive this?
>
> Depends really on what the actual logic looks like. There are a few
> ways of doing this.
>
> You can test for larger cases first before smaller ones:
>
> e.g.
>
> case(
> 9=true and 3=true, D13 & " " & D31
> 9=true; D13;
> 3=true; D31;
> etc
>
> if 9 and 3 are true it will match the first case and return both,
> otherwise just one.
>
> Or you can test for each value and join the results:
>
> e.g.
>
> if(9=true, D17 & " ", "") &
> if(3=true, D31 & " ", "") &
> if(2=true, D45 & " ", "")
> etc
>
> so if 9, 3, 2 were selected it would return the values of d17 d31 d45
> if only 2 were selected it would return the value of d45 only, etc.
>
> or you can use a combination of the two techniques... or maybe
> something else... it REALLY depends on what the complete logic looks
> like.
>
> -Dave- Hide quoted text -
>
> - Show quoted text -

Sounds good. I think the second option sounds better. See actual
code so far below:

Case ( Work done = "9,"; "D17" ; Work done = "3,11," ;"D31"; Work done
= "2,"; "D04"; Work done = "15,"; "D26"; Work done = "3,10,"; "D15";
Work done = "5,"; "D61, D56"; "D72'")

I'll change this using the second option.

Thanks Dave, I am very grateful for your advice.

Re: Conditional Values?

am 08.10.2007 17:58:05 von JayBee

On 8 Oct, 11:29, d-42 wrote:
> On Oct 8, 12:09 am, JayBee wrote:
>
>
>
>
>
> > On 4 Oct, 22:29, d-42 wrote:
>
> > > On Oct 4, 1:27 pm, JayBee wrote:
>
> > > > Hi
>
> > > > I currently have 20 fields with the field format option button, at the
> > > > moment the buttons select a target field and input the relevant value
> > > > 1-20 to indicate which repair code has been selected.
>
> > > > I need to export repair code data to a text file and the target
> > > > database uses different repair codes. Is there a way to convert the
> > > > values before export; Maybe using a lookup table or logical
> > > > algorithms?
>
> > > > For example using Visual Basic style coding
> > > > IF 3= True and 11 = True THEN
> > > > Store D56
> > > > IF 9 = True THEN
> > > > store D17
>
> > > > Maybe I could create a field to store the looked up value and then
> > > > select this field at the time of the export. I am just not sure how
> > > > to acheive the conditional value in Filemaker, is it possible?
>
> > > define a new field, 'repaircode' as a calculation, and set the
> > > calculation as:
>
> > > case( 3=true and 11=true; d56;
> > > 9=true; d17;
> > > "default to this text if nothing is true")
>
> > > Obviously you'll have to clean up the calcluation a bit so that it
> > > makes sense, but that's the general form to use...
>
> > > -regards,
> > > Dave- Hide quoted text -
>
> > > - Show quoted text -
>
> > Dave
>
> > It worked, the only problem is that more than one repair code can be
> > true. For example 9, 3, 11 could be true in which case D17 and D31
> > would need to be stored in RepairCode. With the present code if 9, 3,
> > 11 is selected D17 is stored in RepairCode becuase 9 was selected
> > first. The 9 needs to be enclosed in quotation marks to be recognized
> > as text. Is there anyway that you know of to acheive this?
>
> Depends really on what the actual logic looks like. There are a few
> ways of doing this.
>
> You can test for larger cases first before smaller ones:
>
> e.g.
>
> case(
> 9=true and 3=true, D13 & " " & D31
> 9=true; D13;
> 3=true; D31;
> etc
>
> if 9 and 3 are true it will match the first case and return both,
> otherwise just one.
>
> Or you can test for each value and join the results:
>
> e.g.
>
> if(9=true, D17 & " ", "") &
> if(3=true, D31 & " ", "") &
> if(2=true, D45 & " ", "")
> etc
>
> so if 9, 3, 2 were selected it would return the values of d17 d31 d45
> if only 2 were selected it would return the value of d45 only, etc.
>
> or you can use a combination of the two techniques... or maybe
> something else... it REALLY depends on what the complete logic looks
> like.
>
> -Dave- Hide quoted text -
>
> - Show quoted text -

The amended code is shown below:

Case ( Work done = "9,"; "D17" & " "; " " & Work done = "3,11,"; "D31"
& " "; " " & Work done = "2, "; "D04" & " "; " " & Work done = "5,";
"D61, D56" & " "; " "; "D72") Doesn't seem to work. I have just
copied it here for now so that it is in a location where I can study
it later.

Thanx

Re: Conditional Values?

am 08.10.2007 18:57:39 von ursus.kirk

>>
>> e.g.
>>
>> if(9=true, D17 & " ", "") &
>> if(3=true, D31 & " ", "") &
>> if(2=true, D45 & " ", "")
>> etc
>>
>> so if 9, 3, 2 were selected it would return the values of d17 d31 d45
>> if only 2 were selected it would return the value of d45 only, etc.
>>
>> or you can use a combination of the two techniques... or maybe
>> something else... it REALLY depends on what the complete logic looks
>> like.
>>
>> -Dave- Hide quoted text -
>>
>> - Show quoted text -
>
> The amended code is shown below:
>
> Case ( Work done = "9,"; "D17" & " "; " " & Work done = "3,11,"; "D31"
> & " "; " " & Work done = "2, "; "D04" & " "; " " & Work done = "5,";
> "D61, D56" & " "; " "; "D72") Doesn't seem to work. I have just
> copied it here for now so that it is in a location where I can study
> it later.
>
> Thanx
>

You have included commas as part of a value ( like D=9, ) This could be
true, but seems unlogical.

Keep well, Ursus

Re: Conditional Values?

am 08.10.2007 20:40:12 von JayBee

On Oct 8, 5:57 pm, "Ursus" wrote:
> >> e.g.
>
> >> if(9=true, D17 & " ", "") &
> >> if(3=true, D31 & " ", "") &
> >> if(2=true, D45 & " ", "")
> >> etc
>
> >> so if 9, 3, 2 were selected it would return the values of d17 d31 d45
> >> if only 2 were selected it would return the value of d45 only, etc.
>
> >> or you can use a combination of the two techniques... or maybe
> >> something else... it REALLY depends on what the complete logic looks
> >> like.
>
> >> -Dave- Hide quoted text -
>
> >> - Show quoted text -
>
> > The amended code is shown below:
>
> > Case ( Work done = "9,"; "D17" & " "; " " & Work done = "3,11,"; "D31"
> > & " "; " " & Work done = "2, "; "D04" & " "; " " & Work done = "5,";
> > "D61, D56" & " "; " "; "D72") Doesn't seem to work. I have just
> > copied it here for now so that it is in a location where I can study
> > it later.
>
> > Thanx
>
> You have included commas as part of a value ( like D=9, ) This could be
> true, but seems unlogical.
>
> Keep well, Ursus- Hide quoted text -
>
> - Show quoted text -

Hi Ursus

Commas are included because of the existing system. Technicians
select a repair code, but can select more than one. The system has
been designed to be user friendly to save the technicians typing, so
they click one button for example 9; this will display "9, ". They
may then select 11, so a comma and a space is needed to make it look
presentable and make sense, otherwise all the numbers would be
squashed together.

You have made a good point actually because maybe I left out the space
on some of the values.

One question: What does the " " actually mean? Does it mean that any
other value can be present.

Users can select all of the numbers up to a maximum of 20 so does that
mean I need to put 19 of " "?

Thanks in Advance
Jenny

Re: Conditional Values?

am 08.10.2007 22:01:12 von Grip

On Oct 8, 9:36 am, JayBee wrote:
> On 8 Oct, 11:29, d-42 wrote:
>
>
>
> > On Oct 8, 12:09 am, JayBee wrote:
>
> > > On 4 Oct, 22:29, d-42 wrote:
>
> > > > On Oct 4, 1:27 pm, JayBee wrote:
>
> > > > > Hi
>
> > > > > I currently have 20 fields with the field format option button, at the
> > > > > moment the buttons select a target field and input the relevant value
> > > > > 1-20 to indicate which repair code has been selected.
>
> > > > > I need to export repair code data to a text file and the target
> > > > > database uses different repair codes. Is there a way to convert the
> > > > > values before export; Maybe using a lookup table or logical
> > > > > algorithms?
>
> > > > > For example using Visual Basic style coding
> > > > > IF 3= True and 11 = True THEN
> > > > > Store D56
> > > > > IF 9 = True THEN
> > > > > store D17
>
> > > > > Maybe I could create a field to store the looked up value and then
> > > > > select this field at the time of the export. I am just not sure how
> > > > > to acheive the conditional value in Filemaker, is it possible?
>
> > > > define a new field, 'repaircode' as a calculation, and set the
> > > > calculation as:
>
> > > > case( 3=true and 11=true; d56;
> > > > 9=true; d17;
> > > > "default to this text if nothing is true")
>
> > > > Obviously you'll have to clean up the calcluation a bit so that it
> > > > makes sense, but that's the general form to use...
>
> > > > -regards,
> > > > Dave- Hide quoted text -
>
> > > > - Show quoted text -
>
> > > Dave
>
> > > It worked, the only problem is that more than one repair code can be
> > > true. For example 9, 3, 11 could be true in which case D17 and D31
> > > would need to be stored in RepairCode. With the present code if 9, 3,
> > > 11 is selected D17 is stored in RepairCode becuase 9 was selected
> > > first. The 9 needs to be enclosed in quotation marks to be recognized
> > > as text. Is there anyway that you know of to acheive this?
>
> > Depends really on what the actual logic looks like. There are a few
> > ways of doing this.
>
> > You can test for larger cases first before smaller ones:
>
> > e.g.
>
> > case(
> > 9=true and 3=true, D13 & " " & D31
> > 9=true; D13;
> > 3=true; D31;
> > etc
>
> > if 9 and 3 are true it will match the first case and return both,
> > otherwise just one.
>
> > Or you can test for each value and join the results:
>
> > e.g.
>
> > if(9=true, D17 & " ", "") &
> > if(3=true, D31 & " ", "") &
> > if(2=true, D45 & " ", "")
> > etc
>
> > so if 9, 3, 2 were selected it would return the values of d17 d31 d45
> > if only 2 were selected it would return the value of d45 only, etc.
>
> > or you can use a combination of the two techniques... or maybe
> > something else... it REALLY depends on what the complete logic looks
> > like.
>
> > -Dave- Hide quoted text -
>
> > - Show quoted text -
>
> Sounds good. I think the second option sounds better. See actual
> code so far below:
>
> Case ( Work done = "9,"; "D17" ; Work done = "3,11," ;"D31"; Work done
> = "2,"; "D04"; Work done = "15,"; "D26"; Work done = "3,10,"; "D15";
> Work done = "5,"; "D61, D56"; "D72'")
>
> I'll change this using the second option.
>
> Thanks Dave, I am very grateful for your advice.

Once a Case() statement has found to be true, all subsequent tests are
ignored. So you'll multiple Case() statements, one for each code
you're testing for. That can get unwieldy. so a lot depends on the
actual logic (can one code in your system be involved in more than one
code in the converted system? how made converted codes are there?).

Regardless, it sounds like you have a user entering multiple values in
a single field. You probably should have a separate table that's
related to the current table that contains records for each individual
error code and repair report.

Re: Conditional Values?

am 08.10.2007 23:30:21 von ursus.kirk

>>
>> You have included commas as part of a value ( like D=9, ) This could be
>> true, but seems unlogical.
>>
>> Keep well, Ursus- Hide quoted text -
>>
>> - Show quoted text -
>
> Hi Ursus
>
> Commas are included because of the existing system. Technicians
> select a repair code, but can select more than one. The system has
> been designed to be user friendly to save the technicians typing, so
> they click one button for example 9; this will display "9, ". They
> may then select 11, so a comma and a space is needed to make it look
> presentable and make sense, otherwise all the numbers would be
> squashed together.
>
> You have made a good point actually because maybe I left out the space
> on some of the values.
>
> One question: What does the " " actually mean? Does it mean that any
> other value can be present.
>
> Users can select all of the numbers up to a maximum of 20 so does that
> mean I need to put 19 of " "?
>
> Thanks in Advance
> Jenny
>

Jenny,

" " is a string of one space so "9, " means a nine, a comma and a space
"" would mean an empty string

if you want to search a string (or numbers) from 0 to 19 you would enter
the search as 0...19.

As is in your case I strongly suspect there might be a fundamental error in
your search. It hard to pinpoint it without knowing exactly what you have
set up and what you are trying to achieve. But for one code to be replaced
by an other seems strange. For work done I would create a separate table
that will hold all the possible codes, including theier meaning and a unique
serial. Then create a link table that will hold the many-to-many relation
and so searching and finding could very easily be set up through a
relationship.

Keep well, Ursus

Re: Conditional Values?

am 09.10.2007 09:27:42 von JayBee

On 8 Oct, 22:30, "Ursus" wrote:
> >> You have included commas as part of a value ( like D=9, ) This could be
> >> true, but seems unlogical.
>
> >> Keep well, Ursus- Hide quoted text -
>
> >> - Show quoted text -
>
> > Hi Ursus
>
> > Commas are included because of the existing system. Technicians
> > select a repair code, but can select more than one. The system has
> > been designed to be user friendly to save the technicians typing, so
> > they click one button for example 9; this will display "9, ". They
> > may then select 11, so a comma and a space is needed to make it look
> > presentable and make sense, otherwise all the numbers would be
> > squashed together.
>
> > You have made a good point actually because maybe I left out the space
> > on some of the values.
>
> > One question: What does the " " actually mean? Does it mean that any
> > other value can be present.
>
> > Users can select all of the numbers up to a maximum of 20 so does that
> > mean I need to put 19 of " "?
>
> > Thanks in Advance
> > Jenny
>
> Jenny,
>
> " " is a string of one space so "9, " means a nine, a comma and a space
> "" would mean an empty string
>
> if you want to search a string (or numbers) from 0 to 19 you would enter
> the search as 0...19.
>
> As is in your case I strongly suspect there might be a fundamental error in
> your search. It hard to pinpoint it without knowing exactly what you have
> set up and what you are trying to achieve. But for one code to be replaced
> by an other seems strange. For work done I would create a separate table
> that will hold all the possible codes, including theier meaning and a unique
> serial. Then create a link table that will hold the many-to-many relation
> and so searching and finding could very easily be set up through a
> relationship.
>
> Keep well, Ursus- Hide quoted text -
>
> - Show quoted text -

Ursus

As explained in the original post:

I need to export repair code data to a text file and the target
database uses different repair codes.

Jenny

Re: Conditional Values?

am 09.10.2007 10:42:35 von ursus.kirk

>>
>> if you want to search a string (or numbers) from 0 to 19 you would enter
>> the search as 0...19.
>>
>> As is in your case I strongly suspect there might be a fundamental error
>> in
>> your search. It hard to pinpoint it without knowing exactly what you have
>> set up and what you are trying to achieve. But for one code to be
>> replaced
>> by an other seems strange. For work done I would create a separate table
>> that will hold all the possible codes, including theier meaning and a
>> unique
>> serial. Then create a link table that will hold the many-to-many relation
>> and so searching and finding could very easily be set up through a
>> relationship.
>>
>> Keep well, Ursus- Hide quoted text -
>>
>> - Show quoted text -
>
> Ursus
>
> As explained in the original post:
>
> I need to export repair code data to a text file and the target
> database uses different repair codes.
>
Jenny

This doesn't detract anything from the fact hat using a many-to-many
relationship will make your work a lot easier. You could even search on
words within a description and still use their code when exporting.

Keep well, Ursus

Re: Conditional Values?

am 10.10.2007 08:21:46 von JayBee

On Oct 9, 9:42 am, "Ursus" wrote:
> >> if you want to search a string (or numbers) from 0 to 19 you would enter
> >> the search as 0...19.
>
> >> As is in your case I strongly suspect there might be a fundamental error
> >> in
> >> your search. It hard to pinpoint it without knowing exactly what you have
> >> set up and what you are trying to achieve. But for one code to be
> >> replaced
> >> by an other seems strange. For work done I would create a separate table
> >> that will hold all the possible codes, including theier meaning and a
> >> unique
> >> serial. Then create a link table that will hold the many-to-many relation
> >> and so searching and finding could very easily be set up through a
> >> relationship.
>
> >> Keep well, Ursus- Hide quoted text -
>
> >> - Show quoted text -
>
> > Ursus
>
> > As explained in the original post:
>
> > I need to export repair code data to a text file and the target
> > database uses different repair codes.
>
> Jenny
>
> This doesn't detract anything from the fact hat using a many-to-many
> relationship will make your work a lot easier. You could even search on
> words within a description and still use their code when exporting.
>
> Keep well, Ursus- Hide quoted text -
>
> - Show quoted text -

Hi Ursus

I'm trying to keep it as simple as possible, but if you think that is
best.

So I would create a table with the external databases repair codes e.g
D17, D31 etc and then link this to the exisitng table containing the
field work done? Is that correct, or do I need to create two new
tables because thats where it starts to sound messy if I have another
table for a field which already exists.

I look forward to hearing your thoughts.

Thanks

Re: Conditional Values?

am 10.10.2007 08:53:10 von JayBee

On 10 Oct, 07:21, JayBee wrote:
> On Oct 9, 9:42 am, "Ursus" wrote:
>
>
>
>
>
> > >> if you want to search a string (or numbers) from 0 to 19 you would enter
> > >> the search as 0...19.
>
> > >> As is in your case I strongly suspect there might be a fundamental error
> > >> in
> > >> your search. It hard to pinpoint it without knowing exactly what you have
> > >> set up and what you are trying to achieve. But for one code to be
> > >> replaced
> > >> by an other seems strange. For work done I would create a separate table
> > >> that will hold all the possible codes, including theier meaning and a
> > >> unique
> > >> serial. Then create a link table that will hold the many-to-many relation
> > >> and so searching and finding could very easily be set up through a
> > >> relationship.
>
> > >> Keep well, Ursus- Hide quoted text -
>
> > >> - Show quoted text -
>
> > > Ursus
>
> > > As explained in the original post:
>
> > > I need to export repair code data to a text file and the target
> > > database uses different repair codes.
>
> > Jenny
>
> > This doesn't detract anything from the fact hat using a many-to-many
> > relationship will make your work a lot easier. You could even search on
> > words within a description and still use their code when exporting.
>
> > Keep well, Ursus- Hide quoted text -
>
> > - Show quoted text -
>
> Hi Ursus
>
> I'm trying to keep it as simple as possible, but if you think that is
> best.
>
> So I would create a table with the external databases repair codes e.g
> D17, D31 etc and then link this to the exisitng table containing the
> field work done? Is that correct, or do I need to create two new
> tables because thats where it starts to sound messy if I have another
> table for a field which already exists.
>
> I look forward to hearing your thoughts.
>
> Thanks- Hide quoted text -
>
> - Show quoted text -

Hi Ursus

Just to explain a bit more, we need to send approximately 200 text
files every week. There is a script which creates the text file by
exporting the specified fields in order. We have done this to try and
make the whole process less time consuming. If your method can still
be used inthis way, I don't mind doing it; it sounds like we would
need to search every time before exporting an individual record.

Re: Conditional Values?

am 10.10.2007 20:18:32 von ursus.kirk

>> Hi Ursus
>>
>> I'm trying to keep it as simple as possible, but if you think that is
>> best.
>>
>> So I would create a table with the external databases repair codes e.g
>> D17, D31 etc and then link this to the exisitng table containing the
>> field work done? Is that correct, or do I need to create two new
>> tables because thats where it starts to sound messy if I have another
>> table for a field which already exists.
>>
>> I look forward to hearing your thoughts.
>>
>> Thanks- Hide quoted text -
>>
>> - Show quoted text -
>
> Hi Ursus
>
> Just to explain a bit more, we need to send approximately 200 text
> files every week. There is a script which creates the text file by
> exporting the specified fields in order. We have done this to try and
> make the whole process less time consuming. If your method can still
> be used inthis way, I don't mind doing it; it sounds like we would
> need to search every time before exporting an individual record.
>
>

Hi Jenny,

My thoughts at this moment: I am willing to try and help you with this. But
this involves some detailed mailing about creating and working with
many-to-many relationships. And ofcourse to establish what you have and what
you need. I suggest you mail to me directly and go through this step by step
if you want.

ursus.kirkATwanadooDOTnl

Keep well, Ursus