1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. You may already get a lot of direct attention from Progress. But even so it is hard to bring that attention down into the trenches and get the word out to everyone in the cubicles. We feel that this conference is, by far, the best training opportunity available in the Progress community! We're all about helping you to maximize the OpenEdge technology that you actually have today while preparing you with the knowledge you will need for tomorrow's challenges.

    Register today at http://pugchallenge.org/register.html

How to get value of a data source field in SmartViewer

Discussion in 'Development' started by lukas88, Apr 11, 2012.

  1. lukas88

    lukas88 New Member

    When I populate my SmartViewer using a SmartDataObject the fields in the SmartViewer are "data source fields" instead of "FILL-INS".
    Can anyone help me figure out how to reference these fields. If they were "FILL-INS" then I could just refer to them by their variable name.

    e.g. MESSAGE "The value of the field is: " + FILL-IN-1.

    How should the above line work when we are dealing with data source fields.

  2. RealHeavyDude

    RealHeavyDude Well-Known Member

    You don't tell anything about the Progress/OpenEdge version you are using. As you mention SmartDataViewer I guess you are talking about the ADM2 or Dynamics - but which one?

    Heavy Regards, RealHeavyDude.
  3. lukas88

    lukas88 New Member

    Hi, it's ADM2.
  4. RealHeavyDude

    RealHeavyDude Well-Known Member

    Actually they are FILL-INs. It's just that they are tied to a Temp-Table field. In the internal procedure displayFields of the class super procedure src/adm2/viewer.p you will see more details on how they are populated.

    It depends on what you want to display: The SCREEN-VALUE of the widget (which is a FILL-IN or a procedure - in case it is a SmartDataField) or the value in the data source which would be in almost all cases the SmartDataObject.

    Case 1 - retrieve the value from the widget:
    You can use the internalWidgetHandle API in src/adm2/viewer.p class super procedure of the SDV to retrieve the widgets handle and depending whether it's type is widget or procedure you either access the SCREEN-VALUE attribute directly or invoke the getValue function when it is a procedure.

    Case 2 - retrieve the value from the SDO:
    You can use the columnValue API in src/adm2/dataextcols.p class super procedure of the SDO to retrieve the value.

    Heavy Regards, RealHeavyDude.
  5. lukas88

    lukas88 New Member

    Thanks for that. I will investigate.

Share This Page