Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 07 JAN 2021 07:08:11PM Gerry Van Niekerk wrote:

Happy New year everyone…

Probably too long on holiday..

Is there a way I can read all data on a non data bound form?

apart from using ctrlmap

Thanks

Gerry


At 07 JAN 2021 07:12PM Andrew McAuley wrote:

If none of the record properties work for you (atrecord, record, or even @record) have you tried including the Oiwin common and looking at subrows@(0)?

The Sprezzatura Group

The Sprezzatura Blog

World leaders in all things RevSoft


At 07 JAN 2021 07:12PM Andrew McAuley wrote:

Post removed by author


At 07 JAN 2021 07:16PM Gerry Van Niekerk wrote:

Hi Andrew,

Was going to look at it as an option

Haven't tried it in 10 as yet..

Thanks

Gerry


At 07 JAN 2021 07:23PM Carl Pates wrote:

Hi Gerry,

If it's not data-bound then no - OI has no idea what the structure of a "record" would look like, or what controls and properties constitute "data" for your purposes (there are some obvious ones of course). If this is a common requirement then it might be worth creating a stored procedure to perform this sort of thing for you (I've done this in the past to emulate data-binding in apps that have custom data-binding requirements).

As a 'quick and dirty' method you could do something like this:

   ctrlMap = get_Property( @window, "CONTROLMAP" )

   convert @fm to @rm in ctrlMap

   ctrlData = get_Property( ctrlMap, "DEFPROP" )



   // Now iterate across ctrlMap and look for fields in ctrlData ....

Naming conventions are a help, and you could perhaps assign a UDP custom "@" property to a control that identifies it as a control containing data (you can do this in the Form Designer in v10 rather than needing to do it in code) - that way it would be easy for a generic routine to pick out the data controls.

Regards

Carl Pates


At 07 JAN 2021 07:43PM Gerry Van Niekerk wrote:

Hi Carl,

I just created a new procedure to do just that..

Will use concepts as you explained

Not my original code hence trying to find a quick way

In Arev we had @pseudo with the dict a position number and could get it like so..

Will recreate as best I can

Thanks..

Gerry

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/97b522c5db63a74b8de9f0bdadb13837.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1