Prepopulated list in the SmartForm

  • 15 October 2014
  • 3 replies
  • 0 views

Badge +1

Hi I have a table that I am trying to turn into the SmartForm. First column (Item list) has a SmartObject of different values and it should be prepopulated on the form and shouldn't be editable - the rest of the column must be editable (see the image below):

 

14979i65CBFA8FEDAF3611.png

 

 

 

What is the best way to approach it?

 

Thank you.


3 replies

Badge +8

It looks like your working with two types of data, Zero Harm and Quality.  I created smartobject with values for both of those view.  I created a list view for both items.  Let me know if this gets into the ball park of what your looking for.  If you can supply more information on the project, we might be able to get you moving.


 


In the below scenerio, you could have a user create an item, then populated the Status columns with a hyperlink to the relevant data.


 


11986iB74F85F9CEA6483E.png

Badge +1

I have about 16 Items and  dont think that creating the SO can be the best approach (they are all under one comments group). I've created a SmartObject called Comments and for each Comment  I included the Item column, for each comment entity I have a separate item. But the thing is - how do I bind the form with the list of all items straight away? I can hard coded it, but I was wondering if there is another way to do it. 

Badge +5

Hi, 

 

You might need to use 2 list views, one editable and the other doesn't have to be. I haven't tested this but it should work.

 

The first editable list view (View 1) will be from the primary smartobject and you would have prepopulated that SMO with data and will get list on initialize, the data you need will load when the view initialized and you make the view editable. Change the first column in the editable row to a data label so it's not editable. Your users can use that View (View 1) and update all their data. 

 

Then you add a rule to the first list view (View 1) that when the submit (or save) button is clicked when list item changed (not added but changed), execute the create method on View 2 (you could also use smartobject execution for this if you don't want 2 list views on the same form). Then you drag in the data from View 1 into the controls of view 2 so all the data is created in view 2. 

 

I suggest using 2 different smartobjects, one for each view. SMO 1 will only have static data and SMO 2 will be the one populated with values. 

 

I hope you understand my explanation, actually quite simple. 

 

Reply