cancel
Showing results for 
Search instead for 
Did you mean: 

Input text at runtime and save the content in SAP Design Studio 1.6

former_member334960
Participant
0 Kudos

Hi All,

I have a requirement to add a separate tab in my dashboard to enter notes at runtime and save it. Also is there a way to view the content which was last entered to be displayed the next time when the dashboard is executed?

The dashboard holds all management data and the notes will be the points to be noted during each management meeting. It will be useful if they can view the data which they last entered when they execute the dashboard.

I tried to use the input field component but it did not work according to my requirement.

Could someone please suggest how this can be achieved?

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member265529
Contributor
0 Kudos

Hi Poojitha,

The portable fragment bookmark will be visible to all users if you load them to fragment gallery by using folder ID and group Identifier that you will be using while saving the book mark. When you use the below code on start up it bring all portable fragment bookmarks saved under it.

FRAGMENTGALLERY_1.addItems(Bookmark.PortableFragmentBookmark.getAllBookmarksByFolder("Folder","Group_identifier"));

Please let me know if you need any help on this.

Thanks,

Poovarasan

former_member334960
Participant
0 Kudos

Hi Poovarasan,

I checked on web to understand more on FolderID. I could understad that FolderID should be created by Admin in CMC.

Should I give the Folder name as Folder ID in the below code?

FRAGMENTGALLERY_1.addItems(Bookmark.PortableFragmentBookmark.getAllBookmarksByFolder("Folder","Group_identifier"))

Also,I logged into CMC and checked on "Manage Folders" under Design Studio Application and found a default folder. I gave that name as Folder ID in the code,but the bookmarks are not being loaded.

Code used: FRAGMENTGALLERY_1.addItems(Bookmark.PortableFragmentBookmark.getAllBookmarksByFolder("Analysis Application Bookmarks", "Comment_dashboard"));

Could you please help on this?

Thanks.

former_member265529
Contributor
0 Kudos

Hi Poojitha,

The folder you have specified is a general bookmark folder for all applications.

You can give a folder name while saving the bookmark in the application and use the same folder name in the above code.

Thanks,

Poovarasan

former_member334960
Participant
0 Kudos

Hi Poovarasan,

The code I used for saving bookmark is

var title =INPUTFIELD_2.getValue();
var content1 =INPUTFIELD_3.getValue();
var content2=INPUTFIELD_4.getValue();
var content3=INPUTFIELD_5.getValue();
var content4 =INPUTFIELD_7.getValue();
var content5 =INPUTFIELD_8.getValue();
TEXT_42.setText(title);
TEXT_43.setText(content1+content2+content3+content4+content5);
var bookmarksave=Bookmark.PortableFragmentBookmark.saveBookmark("Comment_dashboard",PANEL_3_COMMENTS,INPUTFIELD_2.getValue());
FRAGMENTGALLERY_1.addItem(bookmarksave);
INPUTFIELD_2.setValue(" ");
INPUTFIELD_3.setValue(" ");
INPUTFIELD_4.setValue(" ");
INPUTFIELD_5.setValue(" ");
INPUTFIELD_7.setValue(" ");
INPUTFIELD_8.setValue(" ");

The code I used on "On Click" of a button to load all fragments for all users is:

 FRAGMENTGALLERY_1.addItems(Bookmark.PortableFragmentBookmark.getAllBookmarksByFolder("Analysis Application Bookmarks", "Comment_dashboard"));

I find the syntax for saving PortabaleFragmentBookamark as below:

Bookmark.PortableFragmentBookmark.saveBookmark(groupIdentifier, selection)

Could you please help on how I can assign this to a different folder while saving the bookmark in the application in the above syntax.

Thanks.

former_member265529
Contributor
0 Kudos

Hi Poojitha,

Can you try below code to get bookmarks?

Bookmark.PortableFragmentBookmark.getAllBookmarkInfosForApplication(groupIdentifier);

Thanks,

Poovarasan

former_member334960
Participant
0 Kudos

Hi Poovarasan,

I have replaced the below code

FRAGMENTGALLERY_1.addItems(Bookmark.PortableFragmentBookmark.getAllBookmarksByFolder("Analysis Application Bookmarks", "Comment_dashboard"));

and used

this code on "On CLick" of Button Bookmark.PortableFragmentBookmark.getAllBookmarkInfosForApplication("Comment_dashboard");

There is no change in the result,

I have also used the code on "On Startup" of the application, but still nothing is being loaded.

Thanks.

former_member334960
Participant
0 Kudos

Hi Poovarasan,

I tried the below codes on "On Click" of button.

FRAGMENTGALLERY_1.addItems(Bookmark.PortableFragmentBookmark.getAllBookmarkInfosForApplication("Comment_dashboard"));
FRAGMENTGALLERY_1.addItems(Bookmark.PortableFragmentBookmark.getAllBookmarkInfos("Comment_dashboard"));

When I click on the button, few of the fragments are added in the fragment gallery with an error message as "Error during Script Processing.Contact the Application Designer to resolve the issue.

error.jpg

Could you please suggest on this?

Thanks.

former_member334960
Participant
0 Kudos

Hi,

I could get half way through by referring various blogs:

https://blogs.sap.com/2016/06/24/how-to-save-comments-in-design-studio/

https://www.youtube.com/watch?v=8St80Hjose4

I used input fields,fragment gallery, split cell container and formatted text view to gets the comments.

Could someone please suggest how this can be saved and also visible for all users.

Version Used : Design Studio 1.6 SP3

Thanks.