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 02 JUN 1998 08:00:02AM Barry Stevens wrote:

UDC (User Defined conversions)

I am having a problem converting and Arev written UDC - XLATE_IND - where the entered value can be changed in the iconv - input validation.

The changed value is not being displayed. the fourth param returned_data does have the correct value, but it is not showing in the edit line.

Could I be doing something wrong…or cant this now be done.

BTW. I cant find any reference in the OI manuals or On-Line help to UDC.

Barry


At 02 JUN 1998 11:07AM DSig (SigSolutions) wrote:

Barry,

Are you sure something else is not going on? I have not noticed (knock on wood) any difference in Arev and OI conversions. Mind you we only use a couple.

dsig

David Tod Sigafoos ~ SigSOlutions

dsig@teleport.com cis:70302,77 voice:503-639-8080


At 02 JUN 1998 04:03PM Cameron Revelation wrote:

Barry,

Is your UDC getting called? (If not, make sure your LOSTFOCUS and/or POSCHANGED isn't doing a "RETURN 0".)

Cameron Purdy

Revelation Software


At 02 JUN 1998 08:26PM Barry Stevens wrote:

Yes, the UDC is getting called - I used debug in the UDC to check the variables.

Ok, so with yours and David's response I will now go looking deeper.

Thanks

Barry


At 03 JUN 1998 03:50AM Barry Stevens wrote:

I cant even get a simple test to work.

Could you try this for me:

Create a SSP of TEST_UDC

  subroutine TEST_UDC(TYPE,PASSED_DATA,LABEL,RETURNED_DATA)
  RETURNED_DATA=XXX"
  status()=0
  return

Create a window with 2 edit lines, in the first put TEST_UDC as the validation.

Run the window and put anything (other than XXX ) and tell me if you get XXX or not.

TIA

Barry


At 03 JUN 1998 04:29AM Oystein Reigem wrote:

Barry,

If you look at e.g subroutine Phone_Format in SYSPROG you'll find an example of an OI validation routine. It seems to be different from the way you did it.

(I've never made any validation and conversion routines myself, but soon I'll need one for a flexible date field, so when I saw your question that made me want to find out too.)

(And first I tried what you did in my OI 3.3 and it's exactly the same here. The routine does run, but nothing happens really.)

- Oystein -


At 03 JUN 1998 05:31AM Andrew P McAuley wrote:

OK tried it here and ultimately it worked. At first for some reason it wouldn't go into the debugger but it seems fine now.

amcauley@sprezzatura.com

Sprezzatura Ltd

World Leaders in all things RevSoft


At 03 JUN 1998 07:04AM Oystein Reigem wrote:

Barry,

Seems I was wrong about OI being different from Arev. The crucial point seems to be to have an output conversion too, e.g, put your TEST_UDC both in Validation and Conversion. At least that's the only thing that matters here with me. There's probably some really obvious explanation here that Andrew will give us in a minute.

- Oystein -


At 03 JUN 1998 08:24AM Barry Stevens wrote:

Andrew

'ultimately it worked' ? So, did you change anything, what did you do to get it to work. Oystein cant get it to work.

Barry


At 03 JUN 1998 08:41AM Barry Stevens wrote:

If you use PHONE_FORMAT only as a validation and not conversion, and you enter aaabbbcccd you should get 1112223334 (or something like that) returned in the prompt…..er..shouldn't you. I cant.

BTW I am using 3.61 (pre release - loading 2/6/98 upgrade now)

Barry


At 03 JUN 1998 10:48AM Oystein Reigem wrote:

Barry,

Yes I got it to work. (There are so many postings in this thread now you may have overlooked the one where I said so.) But as I said I had to do both validation and conversion. Just validation didn't work.

- Oystein -


At 03 JUN 1998 11:32AM Cameron Revelation wrote:

Barry,

If you use PHONE_FORMAT only as a validation and not conversion, and you enter aaabbbcccd you should get 1112223334 (or something like that) returned in the prompt…..er..shouldn't you.

That is not correct. Validation only validates … it is responsible for answering the following question:

1) Is the data as it was entered capable of being converted to a valid internal format of that data, for example is "(800)262-4747" capable of being the phone number "8002624747"?

Conversion is responsible for two questions:

1) Assuming the data is valid, what is the internal format of that data? For example "(800)262-4747" becomes "8002624747". This is ICONV.

2) What is the external format of the data? For example "8002624747" becomes "(800) 262-4747". This is OCONV.

In Arev, the window processor lumped the ICONV into the validation step. Apparently your UDC's assumed that ICONV and OCONV were the same so you only used the validation and didn't bother using the conversion capability.

Restating this, I am assuming that you misunderstood the purpose of the UDC in Arev. The functionality in Arev is split into VALID and CONV. In Arev, VALID had two answer two questions:

1) Is the data as it was entered capable of being converted to a valid internal format of that data, for example is "(800)262-4747" capable of being the phone number "8002624747"?

2) Assuming the data is valid, what is the internal format of that data? For example "(800)262-4747" becomes "8002624747". This is ICONV.

And in Arev CONV had to answer one:

1) What is the external format of the data? For example "8002624747" becomes "(800) 262-4747". This is OCONV.

Cameron Purdy

info@revelation.com


At 03 JUN 1998 11:33AM DSig (SigSOlutions) wrote:

Barry,

Sorry .. I have been out a couple of days.

It looks like answers are there .. are you Okay? If not let me know

dsig

David Tod Sigafoos ~ SigSOlutions

dsig@teleport.com cis:70302,77 voice:503-639-8080


At 03 JUN 1998 10:55PM Barry Stevens wrote:

Cameron

In Arev I have a UDC - XLATE_IND (ex AMcA utilities disk) that is used as a validation where I can enter part of a customers name and it will return the key into the prompt.

If you try the test_udc in Arev it works.!!!

Barry


At 04 JUN 1998 07:31AM Cameron Revelation wrote:

Barry,

In my message, I explained the difference in processing between Arev and OpenInsight. The UDC may be the same, but the terms "validation" and "conversion" have different meanings. In Arev, "validation" also meant "input conversion". In OpenInsight, the term "validation" means only "validation".

Cameron Purdy

Revelation Software


At 04 JUN 1998 08:59PM Barry Stevens wrote:

Ooops, sorry I didn't pick up that you were saying it shouldnt work in OI.

I suppose the work around would be to call it (or a modified version of) from a lostfocus event and set the defprop or maintain focus if status()#0

Thanks for your help

Barry


At 05 JUN 1998 07:38AM Cameron Revelation wrote:

Barry,

Just use the UDC for conversion ….

Cameron Purdy

info@revelation.com

View this thread on the forum...

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