Change the Embeded view via a button

How can I do to change the vue in an embededView via button.

can I call the Embeded view by is embededViewName then put the viewName to display?

if yes… How can I do that?

(can u show me an example script?)

I need to do something like that because the doc can be in read mode… so I’m unable to change a value of a field.

Thanks in advance

Subject: Change the Embeded view via a button

Yes you can do this. Follw the below given steps:

  1. Create a field on the form with the name ViewName and enter the name of the default view in the default value of the field.

  2. Embed a view at the desired location and select FORMULA in the programmers pane. Write in the name os the aobve field i.e. ViewName as the formula. Ignore any prompt.

  3. Now create a button and in it write a code to change the value of the ViewName field to desired view name and refresh the document using @Command([ViewRefreshFields]).

I guess it will work

Regards,

Amith Narera

Subject: RE: Change the Embeded view via a button

Thanks Amith but I do something like this yet.but what happen if a user has only reader acces? …

He cannot change value of a field.

I found another solution:

I create a table with tab. each tab show an embededView

and some tab show sub-tab with embeded view for a total of 25 embededviews… it’s work but performance are poor… anyway it’s better than nothing!

Thanks for support but if you know a better way to do this it will be appreciate.

Thanks

Subject: RE: Change the Embeded view via a button

you may use ENVIRONMENT variables in place of a field.