Virtual Field Type

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
paularstall
Posts: 11
Joined: Tue Oct 09, 2018 2:09 am

Virtual Field Type

Post by paularstall » Wed Nov 25, 2020 3:31 am

Hi.

When trying to create a new virtual field against a table, I've noticed that the Virtual Field type dropdown in the IDE is not always consistent.

We are trying to create a virtual date field that has a Date conversion Type but don't seem to get the option on some Tables.
I can't see any obvious difference between a table that shows all Virtual Field Types and one that only shows Code Fragment and Undefined.

How do we get from this
Virtual Field Type 2.png
Virtual Field Type 2.png (6.82 KiB) Viewed 43779 times
To this
Virtual Field Type 1.png
Virtual Field Type 1.png (8.61 KiB) Viewed 43779 times
I'm probably missing something obvious but I can't think what it is.
btw both these tables are RDMLX enabled.

User avatar
lawingo
Posts: 74
Joined: Fri Dec 04, 2015 6:41 am

Re: Virtual Field Type

Post by lawingo » Wed Nov 25, 2020 3:49 am

My 1st question would be why would you not use the Date Field Format ? - Especially if you are using RDMLX tables.

But to answer your question...
What are the Field types of the Virtual Fields you are using? Our company used the same format you are trying to set up and we would use (S8,0) for both the real field and the virtual field. Are the field formats you are trying to use for the virtual field the same?

Best,
Chad
Sherrill Furniture Company

paularstall
Posts: 11
Joined: Tue Oct 09, 2018 2:09 am

Re: Virtual Field Type

Post by paularstall » Wed Nov 25, 2020 8:15 pm

Thanks Chad.

We have created the normal date field which is S8,0 and written as YYYYMMDD on the table (DCD2DC), but we would normally also create a virtual field to display the date as DDMMYYYY (DCD2CV). as below:
Date conv.png
Date conv.png (9.19 KiB) Viewed 43758 times
Our issue is we can't seem to do this on certain tables and I'm not sure why?

I know there are other ways of doing this but it would be good to know why this isn't possible for certain tables.

Cheers
Paul

srini87
Posts: 6
Joined: Fri Oct 09, 2020 4:21 pm

Re: Virtual Field Type

Post by srini87 » Tue Dec 01, 2020 1:46 am

Paul,

can you please check table properties for RDMLX enabled Flag for both tables?

Regards
Srini

paularstall
Posts: 11
Joined: Tue Oct 09, 2018 2:09 am

Re: Virtual Field Type

Post by paularstall » Tue Dec 01, 2020 2:52 am

Hi Srini.

Yes that was my first thought, the tables are both RDMLX enabled.
Though one was created a few years ago and the other is new.

User avatar
Dino
Posts: 409
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: Virtual Field Type

Post by Dino » Thu Dec 03, 2020 10:30 am

I have tested in V15 EPC 150014, with rdmlx files, rdml files, other files in ibm as other files in window... cant reproduce that. In all cases I can create all kind of virtual fields.
what version/epc are you using?
I dont have any old S/36 flat files that use to be loaded as other files, but wondering is that could be the case...

paularstall
Posts: 11
Joined: Tue Oct 09, 2018 2:09 am

Re: Virtual Field Type

Post by paularstall » Thu Dec 03, 2020 9:48 pm

Hi Dino.

We are on V14.2 EPC 142051

wjustmann
Posts: 2
Joined: Tue Jan 08, 2019 12:09 am

Re: Virtual Field Type

Post by wjustmann » Tue Dec 05, 2023 7:46 am

Did you ever get a solution to this issue? We're having the same problem. Thanks!

trossiter
Posts: 30
Joined: Wed Feb 22, 2017 3:19 am

Re: Virtual Field Type

Post by trossiter » Fri Jan 05, 2024 7:50 am

Adding on to suggest checking that the field types are the same for both the real and virtual fields for doing a date conversion. We do almost the same thing at my company where the real field is a Packed(8,0) or Signed(8,0) field holding the date in YYYYMMDD format and the virtual is a Packed(6,0) or Signed(6,0) field, respectively, holding the date in MMDDYY format.
There are 10 types of people in the world. Those who read binary, and those who don't.

Post Reply