How to add the controls dynamically

  • 17 November 2014
  • 4 replies
  • 2 views

Badge +6

Hi All,

 

How to add the controly Dynamically.

 

Please find the attachment for more clarity on my query.

 

Regards

Srinivas Kondapalli


4 replies

Badge +10

HI, 

 

I am assuming that you want to do this in smartforms. This can be done using the list view using all the built in rules to add new row.

Let me know if this is the case then I can exmplin in more details.

 

Thanks

 

Badge +6

Hi,

 

Thanks for your reply.

 

It would be more help full for me, if you explain in detail.

 

 

Regards

Srinivas kondapalli

Badge +10

Ok, I will attempt to explain.

 

So firstly, depending on what underlying data source you use, you would create a smartobject with the following fields.

So for you it would be:

 

FullName

Email

Phone

Location

Wished Status

 

Now this smartobject will require a create method, update method, delete method and a list method. Not all are required but they are available.

 

You can generate smartobject in a number of ways and some are explained below.

1. You can use smartbox. This where you just go to the designer and create a smartobject by entering the fields you want and the methods you want.

2. Create your own table in SQL and then expose this via the sql service

3. Use a webservice which you can expose and generate smartobjects via the built in service types

4. Write a service object project which can speak to whatever the underlying data source is.

 

For simplicity just use the first method, unless there are other requirements or constraints.

 

Now got to the smartforms designer. Create a new view. Select the smartobject as the source for then view. Then select the view type to list view.

If the smartobject has a list method, create method, update method, delete method etc then all you have to do is tick the enable list editing checkbox. This will automatically create the add, update, delete, buttons for you. Now save this view and then run it. Now when you click the add button, a new row will be added for you data entry.

 

You can either save all the rows at the end or as soon as it is added to the list view.

Use the execute view method for items that are in a specific state to add everything at the end.

This rule will let you select the method for each type of state. 

The states are Added, Removed, Changed etc etc and are self explanatory.

 

Hope this helps.

Please let me know if it’s not clear.

Badge +2

Hi,

I have followed your steps and is able to create custom smart object , custom views and custom forms . In the Custom form Add , Edit , Delete icons are working as expected. However when I click on the Save button the user entered data in the form is saved only in custom smart object. The user entered data is not getting saved in the parent SharePoint list. Kindly assist.

 

Regards,

Hande

 

Reply