I knew this was going to be difficult for me to relay in a email.

Here by steps is what I am doing or trying to do and questions:

1. I am entering data in new form for master.
2. Data in form is not in master yet.
3. I am entering the data for custnub2 and hub into the form.
4. Once custnub2 entered we create a variable this_custnub2
4. Once hub entered we create a variable this_hub
5. The Column ParentCustId is in the Customer Table
6. We are trying to display the following message 'Check warranty
coverage for the unit before handling Breakdown' in the form based on
the variable this_hub being <= 999999 and this_custnub2 relating to
custnub2 in customer where parentCustId = a numeric value.
7. We are trying to relate a variable and date in a table to get a
result. Can this be done?

I hope this is clear enough.
 
 
Stephen Breen

 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Javier
Valencia
Sent: Monday, December 14, 2009 9:44 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Displaying Message On Form on Initial Entry of
Data

Steve,

I am still not sure what you are trying to accomplish. I gave you a
couple of generic examples, based on the information provided, that
should have gotten you started. To help you accomplish what you need,
you need to
specify:

The tables you want to use
Which columns are in which tables (provide table structures) What are
the linking columns (if they do not have the same name) The conditions
you want to check for each table

In your examples below I see several problems:

>>>
1st
Variable
- vthis_hub <= 999999
<<<
Are your defining the variable vthis_hub as <= 999999? A variable can
only be defined as equal to a value, another variable or the value of a
specific column in a table. If the value is entered at run time, then it
should be in a variable...is that what vthis_hub is?
If this variable is always <= 999999, then the condition will always be
true and you do not need it in your expression in the first place.
Also, if the procedure is based on whether the value is <=999999, you
might consider using and IF-THEN-ELSE construct and avoid the count when
not needed.

>>>
SEL COUNT(*) INTO vrows INDIC iv2 where vthis_hub <= 999999 (?) and FROM
Customer WHERE Custnub2 = +
.this_custnub2 and ParentCustId = 105
<<<
It looks like you are trying to get a count based on conditions on two
tables; however, it looks like the first table name is missing and hence
you have a statement with two WHERE conditions and only one table.

Again, look a t the examples I provided where both tables are used and
the sub-select is used to link the tables through a common column. If
you still cannot get it to work, post the information I suggested above
and I am sure you will get a solution.

Javier,

Javier Valencia, PE
913-397-9605 Home
913-915-3137 Cell
913-649-2904 FAX


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Steve
Breen
Sent: Monday, December 14, 2009 5:59 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Displaying Message On Form on Initial Entry of Data

I am trying to display a message in a Form based on the following:
 
1st
Variable
- vthis_hub <= 999999
Note: This is not in a table during data entry just in the form and the
variable.
 
Next:
FROM Customer WHERE Custnub2 = .this_custnub2 and ParentCustId = 105

 
Tried to do it the following way, but can not figure out how to combine
a variable not in a table and data from a table.
 
 
 
-- Warranty.rmd   
-- Set variable vwarranty
-- Used to remind a user to Check A Spread Sheet for Customer Equipment
Verification
-- Major Assumption - var This_CustNub2 is set on form entry
-- Major Assumption - var vThis_hub is set on form entry

Clear var vWarrant

SEL COUNT(*) INTO vrows INDIC iv2 where vthis_hub <= 999999 (?) and FROM
Customer WHERE Custnub2 = +
.this_custnub2 and ParentCustId = 105

IF vrows > 0 THEN

SET VAR vwarranty = 'Check warranty coverage for the unit before
handling Breakdown'
ELSE
SET VAR vwarranty = 'TEST'
ENDIF

RECALC VARIABLES 

RETURN

 
ny recommendations?
 
 
Stephen Breen
CDI Services, Inc.
 
 


Reply via email to