Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 05 APR 2001 11:56:44PM Bob Silverstein wrote:

I have a data entry window. If the record has today's date, I want to hide a field. Otherwise, I want to display it. Any ideas as to how I can do this?


At 06 APR 2001 09:35PM M Ford wrote:

Yes this can be done by loading the window variable (wc_redisplay_list%)with the window prompt numbers you wish to display.

Assuming you have four different window configurations, i would set up four variables and assign the applicable prompt numbers to the associated variable. For example :

(I am using comas as separators as it they are easy to type)

VAR1=1,2,2,3,4,5,8,9"

vAR2=3,4,5,6,7,8,9"

VAR3=4,6,7,8,9"

VAR4=1,2,3,8,9,10"

Begin case

case=1 ; WC_REDISPLAY_LIST%=VAR1

case=2 ; WC_REDISPLAY_LIST%=VAR2

case=3 ; WC_REDISPLAY_LIST%=VAR3

case=4 ; WC_REDISPLAY_LIST%=VAR4

end case

convert "," to @fm in wc_redisplay_list%

wc_valid%=1

wc_display_action%=7

return

I hope this helps.


At 06 APR 2001 09:48PM M Ford wrote:

Yes this can be done by loading the window variable wc_redisplay_list%with the number of the prompts you wish to display.

Assuming you have four different widow configurations, i would set up four variables and assign the window prompts you wish to display for each condition in the appropriate variable.

VAR1=1,2,2,3,4,5,8,9

vAR2 - 3,4,5,6,7,8,9

VAR3=4,6,7,8,9

VAR4 - 1,2,3,8,9,10

WC_REDISPLAY_LIST%=VAR1-,ruFor your situation I would setup variams the number of different To IN yourI do this by assigning the variables to the window disan Fcreating a


At 07 APR 2001 08:52AM Bob Silverstein wrote:

Thanks for your suggestion; I will give it a try.


At 09 APR 2001 10:04AM Michael Slack wrote:

Here is an alternate way of doing what you want and is flexable to additions, subtractions and re-arangments of the window's prompts. Basically you loop thru the WC_W% until you find a dictionary number match. From that you can easly find the prompt position. From there you can modify the prompt to anything you want. You do need to be careful that there are not two or more prompts on the window that map to the same dictionary item.

Here are two examples of working code from one of our applications.

Example 1:

POS='

FOR J=1 TO WC_W_CNT% UNTIL POS

IF DICT_NO=PROMPTS% THEN
  POS=J
END

NEXT J

Example 2:

$INSERT SYSINCLUDE, WINDOW_COMMON%

$INSERT SYSINCLUDE, WINDOW.CONSTANTS

$INSERT SYSINCLUDE, MT_LCPOSITIONS

FOR I=1 TO WC_W_CNT%

IF (WC_W%(I)=WO_DATE_MTR1_RDG$) OR (WC_W%(I)=WO_DATE_MTR2_RDG$) THEN
  WC_W%(I)=CHAR(27):'C31' ;* PROMPT COLOR: DARK-BLUE ON DARK-CYAN
  WC_W%(I)=P' ;* ENTRY TYPE P=PROTECTED
END

NEXT I

WC_DISPLAY_ACTION%=REDISPLAY.PROMPTS$

WC_RESET%=RESET.EDIT$

RETURN

I hope this helps.

Michael Slack


At 09 APR 2001 10:08AM Larry Wilson wrote:

There is source for a subroutine which does this, and more, on my website on the Downloads page.

Larry Wilson

[email protected]

http://AdvancedRevelation.com

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/c35d43ccbe7d0b2385256a260015ac97.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1