K2 Blackpearl - populating SmartObject attributes

  • 29 September 2022
  • 1 reply

I'm very new to learning how to use K2 Blackpearl and am trying to understand how to effectively use SmartObjects.

Basically I have a list of questions I want to ask a user so currently I've created a smartObject with 2 attributes (Question, Answer). I have a list of all the questions I want to ask stored in a SQL server db.

Is it possible to auto-create either an InfoPath form or as ASP.NET page (At this stage I'm not too bothered which one I use - just want to see something working so please feel free to recommend which one is easiest) which will get the questions from the database and auto-create the 'fields' which the user will need to place an answer to the question... Then save this back to the smart object?

Thanks in advance for any help, much appreciated!

1 reply

Userlevel 5
Badge +13
One idea I would propose is to use a SmartForm if that is a product you have access to as they interface very well with SmartObjects. You can make a list of all the questions in your database (create a SmartObject that returns all of these questions). Then, when a question is selected in this list, show an "answer" field and a Save button. On Save, you would set the answer and question value in your SmartObject - you may have to determine if you are creating the question/answer or updating it. Stored Procedures might simplify this