Skip to Content
avatar image
Former Member

Changing DropDown Fileds in Datawindow Dynamically and set for Text Data?

I have one Data Window Containing Four Fields like User Name(Text), Question Type(Drop Down), Question(Text), Answer(Text) Fields followed by Two Buttons.I need to Write logic for Changing Drop Down for Question Type Fields by Default Question will be Populated from Question Text Box.Data Coming from DB, I haveCreated Tables for that. But How to Write this Logic am Trying But Failed to Resolve, Can You give me Guidance on this. Thank You So much in Advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    May 09, 2017 at 09:22 PM

    I did not understand exactly what you are trying to do. But if you are trying to change values in your dddw based on another column, you can retrieve the dropdown datawindow in the itemchanged event of your main datawindow.

    Hope this helps.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 09, 2017 at 10:35 PM

    Hi Venkat,

    Assuming I have understood your requirement correctly ... I would create a dataobject for the Question Type drop down, which retrieves Question Type records using a Question value as a retrieval argument. i.e. it retrieves Question Type records for a given Question.

    Then in the ItemChanged event, when the Question column value is changed, re-retrieve the Question Type DDDW (possibly also when window opens etc)

    Rough sample code -

    Itemchanged :

    DataWindowChild ldwc_question_type

    IF dwo.name = 'question' THEN

    GetChild('question_type', ldwc_question_type)

    ldwc_question_type.SetTransObject(SQLCA)

    ldwc_question_type.Retrieve(data)

    END IF

    Add comment
    10|10000 characters needed characters exceeded