https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/topics/JavaScript-qa.xmlSAP Community - JavaScript2024-05-20T11:10:54.681790+00:00python-feedgenJavaScript Q&A in SAP Communityhttps://community.sap.com/t5/technology-q-a/sap-analytics-cloud-insert-dynamic-comments-in-a-client-calculation/qaq-p/12745931Sap Analytics Cloud insert Dynamic Comments in a client calculation Dimension Comment2023-12-07T15:48:21+01:00filomena_sap_1997https://community.sap.com/t5/user/viewprofilepage/user-id/885624<P>Hello everyone,</P>
<P>what I am trying to achieve is to insert some values in a Dimension Comment Column dinamically based on a condition, </P>
<P>I want to insert into the "Dimension Comment" Column of the right table a comment which contains the value of the VAT measure of the Left table, for the same id between Legal Entity and Intercompany (eg. Intercompany BD01 should contain 58,472,55 in the Dimension Comment column)</P>
<P><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2231573-image.png" /></P>
<P>I have written this code onInitialization event: </P>
<P>var selections = Table_8.getDataSource().getDataSelections();</P>
<P>var seltab1=Table_8.getDataSource().getResultSet(); //this contains the resultset of the left table</P>
<P>var seltab2=Table_9.getDataSource().getResultSet(); //this contains the resultset of the right table</P>
<P>for ( var i=0;i<seltab1.length;i++) //this loops on the left table</P>
<P>{ </P>
<P> for(var j=0;j<seltab2.length;j++){ //this loops on the right table</P>
<P> if(seltab1[i]["Legal_Entity"].id===seltab2[j]["Intercompany"].id){ //if the ids are equal</P>
<P> if(seltab1[i][Alias.MeasureDimension].description==="VAT"){ //if it's the measure VAT</P>
<P> var dataCell1=Table_8.getDataSource().getData(selections[i]); //get that value</P>
<P> var val=dataCell1.rawValue; </P>
<P> Table_9.getComments().setDimensionComment(seltab2[j],val); </P>
<P> //set the comment with the taken value on the current selection</P>
<P> }</P>
<P> }</P>
<P> }</P>
<P>}</P>
<P>But it doesn't work, the applications goes in script error... </P>
<P>the value is taken correctly, the code goes well til the instruction "var val=dataCell1.rawValue;" </P>
<P> There's something wrong in the way I'm passing the current selection...</P>
<P>Can anyone help me correct my code? </P>
<P>Many thanks,</P>
<P>Best Regards.</P>
<P>Filomena.</P>
<P> </P>2023-12-07T15:48:21+01:00https://community.sap.com/t5/technology-q-a/error-during-aggregationbinding-for-sap-suite-ui-commons-networkgraph-node/qaq-p/12759158Error during AggregationBinding for sap.suite.ui.commons.networkgraph.Node2023-12-07T16:07:25+01:00akrienkehttps://community.sap.com/t5/user/viewprofilepage/user-id/372257<P>Hi all,</P>
<P>I am trying to figure out in a single page how to set values into the network graph node and attributes. Without the "attributes" everything is displayed fine, but when using the "attributes" and trying to bind them with the factory method I get the mentioned error message from the title:</P>
<P>""</P>
<P>Here is my coding, running "offline" as a plain test of functionality (as I know its not a complete application):</P>
<PRE><CODE><!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<title>SAPUI5</title>
<!-- 1.) Load SAPUI5 (from a remote server), select theme and control library -->
<script id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.m,sap.suite.ui.commons,sap.ui.commons"></script>
<script>
//factory function for Groups
function createGroup(id, context) {
return new sap.suite.ui.commons.networkgraph.Group({
key: { path: "key" },
title: { path: "title" },
icon: { path: "icon" },
collapsed: { path: "collapsed" },
shape: { path: "shape" },
});
}
//factory function for Attributes
function createAttribute(id, context) {
return new sap.suite.ui.commons.networkgraph.ElementAttribute({
label: { path: "label" },
value: { path: "value" },
});
}
//factory function for Nodes
function createNode(id, context) {
return new sap.suite.ui.commons.networkgraph.Node({
key: { path: "key" },
title: { path: "title" },
icon: { path: "icon" },
group: { path: "group" },
shape: { path: "shape" },
attributes : { path : "attributes" },
});
}
//factory function for Lines
function createLine(id, context) {
return new sap.suite.ui.commons.networkgraph.Line({
from: { path: "from" },
to: { path: "to" },
arrowPosition: { path: "arrowPosition"}
});
}
//function that draws page content
function init() {
// create json of data model
const json =
// <! merge json!>
{"nodes":[ {"key":1,"title":"Component 1","icon":"sap-icon://blur","shape":"Circle", "attributes": [{"label":"a","value":"1"}]},
{"key":2,"title":"Component 2","icon":"sap-icon://blur","shape":"Circle", "attributes": [{"label":"a","value":"1"}]},
{"key":3,"title":"Component 3","icon":"sap-icon://blur","shape":"Circle", "attributes": [{"label":"a","value":"1"}]},
{"key":4,"title":"Component 4","icon":"sap-icon://blur","shape":"Circle", "attributes": [{"label":"a","value":"1"}]}
],
"lines":[ {"from":2,"to":4,"arrowposition":"Middle"},
{"from":3,"to":4,"arrowposition":"Middle"}
]
};
const model = new sap.ui.model.json.JSONModel(json);
const panel = new sap.m.Panel({
headerText: "Simple Network Graph App",
}).placeAt("uiArea");
const vbox = new sap.m.VBox();
vbox.addStyleClass("sapUiSmallMargin");
panel.addContent(vbox);
// Create graph and bind aggregations to model paths
const graph = new sap.suite.ui.commons.networkgraph.Graph();
graph.setModel(model);
graph.bindAggregation("groups", "/groups", createGroup);
graph.bindAggregation("nodes", "/nodes", createNode);
graph.bindAggregation("attributes", "/nodes/attributes", createAttribute); // <= ???
graph.bindAggregation("lines", "/lines", createLine);
vbox.addItem(graph);
}
//attaching init function to core initializing callback
sap.ui.getCore().attachInit(init);
</script>
</head>
<body class="sapUiBody">
<!-- This is where you place the UI5 -->
<div id="uiArea"></div>
</body>
</html><br></CODE></PRE>
<P>How could I bind the attributes from the json model here to the nodes-attribute? Any help or hint will be appreciated.</P>
<P>Thanks.</P>2023-12-07T16:07:25+01:00https://community.sap.com/t5/technology-q-a/customizing-fiori-app-navigation-overriding-extension-api-event-handler/qaq-p/12796245Customizing Fiori App Navigation: Overriding Extension API Event Handler2023-12-13T17:05:10+01:00AjayDeshettyhttps://community.sap.com/t5/user/viewprofilepage/user-id/161517<P>Hello Experts,</P>
<P>We have a requirement to extend the standard Fiori application, Manage Purchase Requisition app.</P>
<P><STRONG>Requirement</STRONG>: When we are creating an order in this application, it currently navigates to a standard application, but we want it to navigate to a custom application.</P>
<P><STRONG>Analysis:</STRONG> Upon investigation of standard application, we found that they're attaching ( using extension API ) an onAfterActivate event to the object page in the application. This event is executed upon completion of the creation process, and within it, they've hardcoded the navigation to a standard application using a semantic object and action.</P>
<P>Standard App Code :</P>
<P><BR /></P>
<PRE><CODE> this.extensionAPI.getTransactionController().attachAfterActivate(jQuery.proxy(this.onAfterActivate, this));</CODE></PRE>
<PRE><CODE> onAfterActivate: function(e) {
e.activationPromise.then(function(r) {
try {
var m = JSON.parse(r.response.headers["sap-message"]).message;
M.show(m);
} catch (c) {}
;setTimeout(function() {
if (!this.oNavigationHandler) {
this.oNavigationHandler = new N(this,sap.fe.navigation.Mode.ODataV2);
}
this.oNavigationHandler.navigate("PurchaseRequisition", "createSSP", {});
}
.bind(this), 6000);
}
.bind(this));
}<BR /></CODE></PRE>
<P>Is there a way to override the attached event so that we can write our own code for navigating to the custom application?</P>2023-12-13T17:05:10+01:00https://community.sap.com/t5/technology-q-a/how-reuse-parts-of-a-sapui5-application-in-other-multiple-sap-ui5/qaq-p/12815626How reuse parts of a SAPUI5 application in other/multiple sap ui5 applications.2024-01-01T14:46:10+01:00deepaksinghbondilihttps://community.sap.com/t5/user/viewprofilepage/user-id/891853<P>I have a requirements to use one application fragments in all the application where the same fragment is used in all apps , how can i reuse fragments of one app in another app which should work even after deployment to cloud foundary or any other system.</P>
<P>i have checked all blogs related to this but there is no blog which contains fragments and i need a help from sap world <BR />to reuse fragments over multiple applications.</P>
<P>Please help me with any git links or any blog related to my topic .</P>2024-01-01T14:46:10+01:00https://community.sap.com/t5/technology-q-a/sac-story-trystatement/qaq-p/12817005SAC; Story; tryStatement2024-01-04T14:08:23+01:00attila_kisshttps://community.sap.com/t5/user/viewprofilepage/user-id/855988<P>Is it possible to write TRY-CATCH-FINALLY statement in script in order to provide a 'friendlier' error message for the users?</P>
<P><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2231380-image.png" /></P>
<P>Many thanks in advance!</P>2024-01-04T14:08:23+01:00https://community.sap.com/t5/technology-q-a/how-to-consume-one-application-component-in-another-using-a-destination/qaq-p/12820263How to consume one application component in another using a destination service in Bas2024-01-12T10:07:51+01:00deepaksinghbondilihttps://community.sap.com/t5/user/viewprofilepage/user-id/891853<P>i have sap ui5 application with two input fields with value help dialogs and two fragments will be opened by clicking the valuehelps . </P>
<P>i have deployed the apps in cloud foundry now i have deployed app url </P>
<P>now i have another sap ui5 application, i want to consume the fragments and input fields of deloyed app in this appliation <BR />how can i reuse the component of a deployed application in other sap ui5 apps using a destination service or is there anyway to consume the app <BR />i have created cap application and created a fiori app and deployed in CF and i created a destination <BR />is it possible to do this using destination <BR />I need assistance regarding or i need any git links with similar requirement.</P>2024-01-12T10:07:51+01:00https://community.sap.com/t5/technology-q-a/override-of-onbeforenavigation-in-object-page-controller-extension-is-not/qaq-p/13590424Override of onBeforeNavigation in Object Page Controller extension is not called2024-02-01T09:08:24.620000+01:00MattDionhttps://community.sap.com/t5/user/viewprofilepage/user-id/7084<P>Hello,</P><P>I have the requirement to override the navigation from a responsive table on an Object Page in an OData V4 app. I have followed the instructions here:</P><P><A href="https://sapui5.hana.ondemand.com/sdk/#/topic/b20dc7a3d9ca41bebdb86fc3ae3295bf" target="_blank" rel="noopener nofollow noreferrer">https://sapui5.hana.ondemand.com/sdk/#/topic/b20dc7a3d9ca41bebdb86fc3ae3295bf</A></P><P>My problem is that the <SPAN>onBeforeNavigation override method is never called, and it just proceeds with the default navigation settings. </SPAN></P><P><SPAN>I have overridden the onInit and onBeforeRendering methods in the same controller extension, and these work fine. Also i</SPAN><SPAN>n the same app, I have a List Report controller extension with the routing/onBeforeNavigation method overridden, and this works fine.</SPAN></P><P><SPAN>Are the instructions incorrect/incomplete for the Object Page table? Is there a trick here that I am missing?</SPAN></P><P> </P><pre class="lia-code-sample language-javascript"><code>ControllerExtension.extend("sap.fe.templates.ObjectPage.ObjectPageController", {
override: {
routing: {
onBeforeNavigation: function(oContextInfo) {
console.log(oContextInfo);
return true;
}
}</code></pre><P> </P><P> </P>2024-02-01T09:08:24.620000+01:00https://community.sap.com/t5/technology-q-a/how-to-use-node-modules-in-sapui5-fiori-javascript/qaq-p/13598124How to use node modules in SAPUI5 Fiori Javascript2024-02-07T15:24:45.752000+01:00UlisesCasalhttps://community.sap.com/t5/user/viewprofilepage/user-id/1392744<P><SPAN>Hello everyone! I am developing a Fiori app <STRONG>using Javascript</STRONG> and I integrated it with Node.js. Then, I installed the SPPull library (the library I need) with npm and I have it in the node_modules folder, this is the structure of the library:</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="UlisesCasal_0-1707315626150.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/62124i502C403D92C48046/image-size/medium?v=v2&px=400" role="button" title="UlisesCasal_0-1707315626150.png" alt="UlisesCasal_0-1707315626150.png" /></span></P><P>Source code of library: <A href="https://github.com/koltyakov/sppull" target="_blank" rel="nofollow noopener noreferrer">GitHub - koltyakov/sppull: <span class="lia-unicode-emoji" title=":paperclip:">š</span> Download files from SharePoint document libraries using Node.js without hassles</A></P><P><SPAN>My problem is that I donāt know how to import this library (SPPull) into my view controller (In sap.ui.define). What path should I use? What steps should I follow? Regards.</SPAN></P>2024-02-07T15:24:45.752000+01:00https://community.sap.com/t5/technology-q-a/how-to-request-property-for-all-selected-items-in-list-report/qaq-p/13602041How to request property for all selected items in list report?2024-02-12T08:31:59.218000+01:00MattDionhttps://community.sap.com/t5/user/viewprofilepage/user-id/7084<P>I have an OData v4 based FE list report app. I need to take action whenever the user changes the selection of list report's table entries. The first step is to request a few properties from each selected entry.</P><P>I know how to get access to the selected entries, and each selected entry has its own context. So, I can use these contexts to request the properties I need. However, this seems rather inefficient as that means I have a backend call for each entry instead of one call for all selected entries. When the user selects many items from the list (e.g. 'Select All'), this becomes a performance problem.</P><P>Is there a way to submit a single group request for properties, for all selected entries? There has to be, but I guess I'm missing it.</P>2024-02-12T08:31:59.218000+01:00https://community.sap.com/t5/enterprise-resource-planning-q-a/call-seriesservice-getdocumentseries-in-service-layer-javascript/qaq-p/13637598Call SeriesService_GetDocumentSeries in Service Layer javascript2024-03-14T05:06:10.133000+01:00SayEangKheanghttps://community.sap.com/t5/user/viewprofilepage/user-id/160228<P>Hello SAP Community,</P><P>i having issue on how to get document series list in service layer (javascript). i can not call this SeriesService_GetDocumentSeries in service layer.<BR /><BR />is there any way to get document series in service layer?<BR /><BR />Thank you.</P>2024-03-14T05:06:10.133000+01:00https://community.sap.com/t5/technology-q-a/method-get-not-allowed-for-action-import/qaq-p/13648277Method GET not allowed for ACTION.IMPORT2024-03-25T10:17:57.150000+01:00protectorhttps://community.sap.com/t5/user/viewprofilepage/user-id/893217<P><SPAN><SPAN class="">I am having an issue with an action that Implemented to Import CSVs.<BR /><BR />Locally, it works like a charm, but then when deployed on BTP, I keep getting the error:<BR />GET Method Not Allowed for ACTION.IMPORT.<BR /><BR />I am making a post request and not a get. (FYI)<BR /><BR />I tested posting a small string, it worked just fine but with the Uploaded CSV āBig stringā, I get the error.<BR /><BR />Screenshots below:</SPAN></SPAN></P><P><SPAN><SPAN class="">Frontend upload logic</SPAN></SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-03-25 at 09.14.34.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/85853i71C78E6276A2283F/image-size/medium?v=v2&px=400" role="button" title="Screenshot 2024-03-25 at 09.14.34.png" alt="Screenshot 2024-03-25 at 09.14.34.png" /></span>ā</P><P>Handler (nodejs)</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-03-25 at 09.15.18.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/85854i20257BC4C55590F7/image-size/medium?v=v2&px=400" role="button" title="Screenshot 2024-03-25 at 09.15.18.png" alt="Screenshot 2024-03-25 at 09.15.18.png" /></span></P><P>Action (schema.cds)</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-03-25 at 09.15.03.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/85855i12D560B170035B9B/image-size/medium?v=v2&px=400" role="button" title="Screenshot 2024-03-25 at 09.15.03.png" alt="Screenshot 2024-03-25 at 09.15.03.png" /></span></P><P>Error:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-03-25 at 09.53.42.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/85856iC68845CE8EBE1DB4/image-size/medium?v=v2&px=400" role="button" title="Screenshot 2024-03-25 at 09.53.42.png" alt="Screenshot 2024-03-25 at 09.53.42.png" /></span></P>2024-03-25T10:17:57.150000+01:00https://community.sap.com/t5/technology-q-a/different-behaviour-business-application-studio-vs-sap-btp-html5/qaq-p/13649909Different behaviour Business Application Studio vs SAP BTP HTML5-Application with Fragments2024-03-26T13:43:20.018000+01:00JulThttps://community.sap.com/t5/user/viewprofilepage/user-id/153093<P>Hi all, </P><P>I'm a Javascript-Noob but need some of it for my Fiori Elements Enhancements. </P><P>I built an App where I want to have a <EM>Custom Action.</EM> Within this action I'm calling an API to fetch values and then calling a fragment I built with XML. Inside the Fragment the values fetched will be visible in a dropdown. On Business Application Studio everything is working. My Fragmentis opening without problems and my data is presented there. </P><P>Then I deployed the App to our BTP as an HTML5-Application (via MTA). The App is opening and everything works beside the Fragment. My coding looks like this (instead of debugger I'm doing some things, but in the end I'm opening the Fragment via the open()-Method.</P><P> </P><pre class="lia-code-sample language-javascript"><code>var QueryTaskCodes = jQuery.ajax
({
type: "GET",
contentType: "application/json",
url: URLTaskCodes,
dataType: "json",
success: function (data) {
if (!that.pDialogCloseCreateNotification) {
that.loadFragment({
id: "CreateAndClose",
name: "some.app.ext.fragment.CreateAndClose",
type: "XML",
controller: that //this
}).then((oDialog) => {
debugger;
that.pDialogCloseCreateNotification = oDialog;
that.pDialogCloseCreateNotification.open();
});
}}})</code></pre><P> </P><P> Within the Busines Application Studio Preview the debugger shows, that oDialog is set.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JulT_0-1711456754254.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/86681iFB21F70690F89E4C/image-size/medium?v=v2&px=400" role="button" title="JulT_0-1711456754254.png" alt="JulT_0-1711456754254.png" /></span></P><P>However, on BTP HTML5-App it's undefined. </P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JulT_1-1711456805755.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/86682i7D77BD4BA55F420B/image-size/medium?v=v2&px=400" role="button" title="JulT_1-1711456805755.png" alt="JulT_1-1711456805755.png" /></span></P><P>What am I missing? What am I doing wrong?</P><P>Best wishes,</P><P>Julian</P><P> </P>2024-03-26T13:43:20.018000+01:00https://community.sap.com/t5/technology-q-a/binding-issue-in-planning-calender/qaq-p/13662242binding issue in planning calender2024-04-08T12:26:46.865000+02:00varshaSadashivahttps://community.sap.com/t5/user/viewprofilepage/user-id/1433748<DIV><DIV><SPAN><mvc:View</SPAN> <SPAN>controllerName</SPAN><SPAN>=</SPAN><SPAN>"vaspp.timetracking.controller.timetracking"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>xmlns:core</SPAN><SPAN>=</SPAN><SPAN>"sap.ui.core"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>xmlns:mvc</SPAN><SPAN>=</SPAN><SPAN>"sap.ui.core.mvc"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>xmlns:unified</SPAN><SPAN>=</SPAN><SPAN>"sap.ui.unified"</SPAN></DIV><DIV><SPAN> </SPAN></DIV><DIV><SPAN> </SPAN><SPAN>xmlns</SPAN><SPAN>=</SPAN><SPAN>"sap.m"</SPAN><SPAN>></SPAN></DIV><DIV><SPAN> </SPAN><SPAN><VBox</SPAN> <SPAN>class</SPAN><SPAN>=</SPAN><SPAN>"sapUiSmallMargin"</SPAN> <SPAN>id</SPAN><SPAN>=</SPAN><SPAN>"VBoxtimetracking"</SPAN><SPAN>></SPAN></DIV><DIV><SPAN> </SPAN><SPAN><PlanningCalendar</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>id</SPAN><SPAN>=</SPAN><SPAN>"PC1"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>appointmentsVisualization</SPAN><SPAN>=</SPAN><SPAN>"Filled"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>viewChange</SPAN><SPAN>=</SPAN><SPAN>"viewChange"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>viewKey</SPAN><SPAN>=</SPAN><SPAN>"Week"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>appointmentSelect</SPAN><SPAN>=</SPAN><SPAN>"handleAppointmentSelect"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>showEmptyIntervalHeaders</SPAN><SPAN>=</SPAN><SPAN>"false"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>showWeekNumbers</SPAN><SPAN>=</SPAN><SPAN>"true"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>intervalSelect</SPAN><SPAN>=</SPAN><SPAN>"handleAppointmentAddWithContext"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>rows</SPAN><SPAN>=</SPAN><SPAN>"</SPAN><SPAN>{</SPAN><SPAN>path</SPAN><SPAN>:</SPAN> <SPAN>'/'</SPAN><SPAN>}</SPAN><SPAN>"</SPAN><SPAN>></SPAN></DIV><DIV><SPAN> </SPAN><SPAN><views></SPAN></DIV><DIV><SPAN> </SPAN><SPAN><PlanningCalendarView</SPAN> <SPAN>id</SPAN><SPAN>=</SPAN><SPAN>"_IDGenPlanningCalendarView1"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>key</SPAN><SPAN>=</SPAN><SPAN>"Day"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>intervalType</SPAN><SPAN>=</SPAN><SPAN>"Hour"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>description</SPAN><SPAN>=</SPAN><SPAN>"Day"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>intervalsS</SPAN><SPAN>=</SPAN><SPAN>"3"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>intervalsM</SPAN><SPAN>=</SPAN><SPAN>"6"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>intervalsL</SPAN><SPAN>=</SPAN><SPAN>"12"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>showSubIntervals</SPAN><SPAN>=</SPAN><SPAN>"true"</SPAN><SPAN>></SPAN></DIV><DIV><SPAN> </SPAN><SPAN></PlanningCalendarView></SPAN></DIV><DIV><SPAN> </SPAN><SPAN><PlanningCalendarView</SPAN> <SPAN>id</SPAN><SPAN>=</SPAN><SPAN>"_IDGenPlanningCalendarView2"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>key</SPAN><SPAN>=</SPAN><SPAN>"Week"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>intervalType</SPAN><SPAN>=</SPAN><SPAN>"Day"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>description</SPAN><SPAN>=</SPAN><SPAN>"Week"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>intervalsS</SPAN><SPAN>=</SPAN><SPAN>"1"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>intervalsM</SPAN><SPAN>=</SPAN><SPAN>"2"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>intervalsL</SPAN><SPAN>=</SPAN><SPAN>"7"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>showSubIntervals</SPAN><SPAN>=</SPAN><SPAN>"true"</SPAN><SPAN>></SPAN></DIV><DIV><SPAN> </SPAN><SPAN></PlanningCalendarView></SPAN></DIV><DIV><SPAN> </SPAN><SPAN><PlanningCalendarView</SPAN> <SPAN>id</SPAN><SPAN>=</SPAN><SPAN>"_IDGenPlanningCalendarView3"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>key</SPAN><SPAN>=</SPAN><SPAN>"OneMonth"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>intervalType</SPAN><SPAN>=</SPAN><SPAN>"Month"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>description</SPAN><SPAN>=</SPAN><SPAN>"Month"</SPAN><SPAN>></SPAN></DIV><DIV><SPAN> </SPAN><SPAN></PlanningCalendarView></SPAN></DIV><DIV><SPAN> </SPAN><SPAN></views></SPAN></DIV><DIV><SPAN> </SPAN><SPAN><rows></SPAN></DIV><DIV><SPAN> </SPAN><SPAN><PlanningCalendarRow</SPAN> <SPAN>id</SPAN><SPAN>=</SPAN><SPAN>"PlanningCalendarRowtimetracking"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>title</SPAN><SPAN>=</SPAN><SPAN>"{firstName} {lastName}"</SPAN> <SPAN>text</SPAN><SPAN>=</SPAN><SPAN>"{designation}"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>appointments</SPAN><SPAN>=</SPAN><SPAN>"</SPAN><SPAN>{</SPAN><SPAN>path</SPAN> <SPAN>:</SPAN> <SPAN>'p_appointments'</SPAN><SPAN>,</SPAN> <SPAN>templateShareable</SPAN><SPAN>:</SPAN><SPAN>false</SPAN><SPAN>}</SPAN><SPAN>"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>intervalHeaders</SPAN><SPAN>=</SPAN><SPAN>"</SPAN><SPAN>{</SPAN><SPAN>path</SPAN><SPAN>:</SPAN> <SPAN>'p_appointments'</SPAN><SPAN>,</SPAN> <SPAN>templateShareable</SPAN><SPAN>:</SPAN> <SPAN>false</SPAN><SPAN>}</SPAN><SPAN>"</SPAN> <SPAN>></SPAN></DIV><DIV><SPAN> </SPAN><SPAN><appointments></SPAN></DIV><DIV><SPAN> </SPAN><SPAN><unified:CalendarAppointment</SPAN> <SPAN>id</SPAN><SPAN>=</SPAN><SPAN>"CalendarAppointmenttimetracking"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>startDate</SPAN><SPAN>=</SPAN><SPAN>"{startDate}"</SPAN> <SPAN>endDate</SPAN><SPAN>=</SPAN><SPAN>"{endDate}"</SPAN> <SPAN>title</SPAN><SPAN>=</SPAN><SPAN>"{timesheetModel>totalHours}"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>type</SPAN><SPAN>=</SPAN><SPAN>"{= ${status} === 'Approved' ? 'Type08' : (${status} === 'Rejected' ? 'Type13' : 'Type06') }"</SPAN> <SPAN>tentative</SPAN><SPAN>=</SPAN><SPAN>"false"</SPAN> <SPAN>></SPAN></DIV><DIV><SPAN> </SPAN><SPAN></unified:CalendarAppointment></SPAN></DIV><DIV><SPAN> </SPAN><SPAN></appointments></SPAN></DIV><DIV><SPAN> </SPAN><SPAN><intervalHeaders></SPAN></DIV><DIV><SPAN> </SPAN><SPAN><unified:CalendarAppointment</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>id</SPAN><SPAN>=</SPAN><SPAN>"CalendarIntervaltimetracking"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>startDate</SPAN><SPAN>=</SPAN><SPAN>"{startDate}"</SPAN> <SPAN>endDate</SPAN><SPAN>=</SPAN><SPAN>"{endDate}"</SPAN> <SPAN>title</SPAN><SPAN>=</SPAN><SPAN>"{name}"</SPAN> <SPAN>text</SPAN><SPAN>=</SPAN><SPAN>"{description}"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>type</SPAN><SPAN>=</SPAN><SPAN>"Type02"</SPAN> <SPAN>tentative</SPAN><SPAN>=</SPAN><SPAN>"false"</SPAN></DIV><DIV><SPAN> </SPAN><SPAN>></SPAN></DIV><DIV><SPAN> </SPAN><SPAN></unified:CalendarAppointment></SPAN></DIV><DIV><SPAN> </SPAN><SPAN></intervalHeaders></SPAN></DIV><DIV><SPAN> </SPAN><SPAN></PlanningCalendarRow></SPAN></DIV><DIV><SPAN> </SPAN><SPAN></rows></SPAN></DIV><DIV><SPAN> </SPAN><SPAN></PlanningCalendar></SPAN></DIV><DIV><SPAN> </SPAN><SPAN></VBox></SPAN></DIV><DIV><SPAN></mvc:View><BR /> startDate="{startDate}" endDate="{endDate}" title="{timesheetModel>totalHours}" not binding<BR /></SPAN></DIV></DIV>2024-04-08T12:26:46.865000+02:00https://community.sap.com/t5/enterprise-resource-planning-q-a/smarttable-barcode/qaq-p/13666044smarttable barcode2024-04-10T17:47:20.454000+02:00javierrubio_01https://community.sap.com/t5/user/viewprofilepage/user-id/714802<P>Hi,</P><P>I need to convert a smart table cell into a barcode image.</P><P>I am using the function <SPAN>JsBarcode inside a formatter but I am having an error because, I think, the table is not rendered yet.</SPAN></P><P><SPAN>In my view.xml I have:</SPAN></P><P> </P><DIV><DIV><EM> <cells></EM></DIV><DIV><EM> <Image id="T" src="{path: 'Obj_key', formatter:'.formatBarcode'}" /></EM></DIV><DIV><EM> </cells></EM></DIV><DIV> </DIV><DIV><SPAN>Is there a way I can manipulate a smart table item cell after it has been rendered, as I think this might solve the issue?.</SPAN></DIV><DIV><SPAN>Thanks,</SPAN></DIV><DIV><SPAN>Javier</SPAN></DIV></DIV>2024-04-10T17:47:20.454000+02:00https://community.sap.com/t5/technology-q-a/sapui5-smarttable-barcode/qaq-p/13666080sapui5 smarttable barcode2024-04-10T18:21:21.439000+02:00javierrubio_01https://community.sap.com/t5/user/viewprofilepage/user-id/714802<P>Hi,</P><P>I need to convert a smart table cell into a barcode image.</P><P>I am using the function <SPAN>JsBarcode inside a formatter but I am having an error because, I think, the table is not rendered yet.</SPAN></P><P><SPAN>In my view.xml I have:</SPAN></P><P> </P><DIV><DIV><EM> <cells></EM></DIV><DIV><EM> <Image id="T" src="{path: 'Obj_key', formatter:'.formatBarcode'}" /></EM></DIV><DIV><EM> </cells></EM></DIV><DIV> </DIV><DIV><SPAN>Is there a way I can manipulate a smart table item cell after it has been rendered, as I think this might solve the issue?.</SPAN></DIV><DIV><SPAN>Thanks,</SPAN></DIV><DIV><SPAN>Javier</SPAN></DIV></DIV>2024-04-10T18:21:21.439000+02:00https://community.sap.com/t5/technology-q-a/how-to-add-dynamically-formcell-or-button-table-in-sectionedtable0-of/qaq-p/13674564How to add dynamically formcell or button table in SectionedTable0 of Current(Main) MDK Page2024-04-18T13:27:19.979000+02:00dwipalhttps://community.sap.com/t5/user/viewprofilepage/user-id/856914<P>I am working on dynamically adding formcell or button based on the Odata action response. I have referred to this link <A href="https://community.sap.com/t5/technology-blogs-by-sap/what-s-new-in-mobile-development-kit-client-6-0/ba-p/13503045#PageDefinition:~:text=metadata%20in%20JSON-,format,-As%20we%20introduced" target="_self">reference link</A> , but it opens a new page of Main page rather than refreshing the current one. </P><pre class="lia-code-sample language-json"><code>{
"Controls": [
{
"FilterFeedbackBar": {
"ShowAllFilters": false,
"_Type": "Control.Type.FilterFeedbackBar"
},
"_Type": "Control.Type.SectionedTable",
"_Name": "SectionedTable0",
"Sections": [
{
"Separators": {
"TopSectionSeparator": false,
"BottomSectionSeparator": true,
"HeaderSeparator": true,
"FooterSeparator": true,
"ControlSeparator": true
},
"Controls": [
{
"validationProperties": {
"SeparatorBackgroundColor": "#ff0000",
"SeparatorIsHidden": false,
"ValidationViewIsHidden": true
},
"Value": "Weekly",
"_Type": "Control.Type.FormCell.SegmentedControl",
"_Name": "FormCellSegmentedControl0",
"IsVisible": true,
"Separator": false,
"Caption": "Time Entry",
"IsEditable": true,
"ApportionsSegmentWidthsByContent": false,
"Segments": [
"Daily",
"Weekly"
]
}
],
"Visible": true,
"EmptySection": {
"FooterVisible": false
},
"_Type": "Section.Type.FormCell",
"_Name": "SectionFormCell0"
},
{
"Separators": {
"TopSectionSeparator": false,
"BottomSectionSeparator": true,
"HeaderSeparator": true,
"FooterSeparator": true,
"ControlSeparator": true
},
"Controls": [
{
"Value": "Enter Date",
"_Type": "Control.Type.FormCell.DatePicker",
"_Name": "FormCellSelectCopyWeekDatePicker",
"IsVisible": true,
"Separator": true,
"Caption": "Select Week",
"IsEditable": true,
"Mode": "Date",
"OnValueChange": "/DemoApp/Rules/FetchSelectedDateTimeBill.js"
}
],
"Visible": true,
"EmptySection": {
"FooterVisible": false
},
"_Type": "Section.Type.FormCell",
"_Name": "SectionFormCell1"
},
]
}
],
"_Type": "Page",
"_Name": "Main",
"Caption": "MDKDemoApp",
"PrefersLargeCaption": true,
"ActionBar": {
"Items": [
{
"_Name": "ActionBarItem0",
"Caption": "User Menu",
"Icon": "sap-icon://customer",
"Position": "Right",
"IsIconCircular": false,
"Visible": true,
"OnPress": "/DemoApp/Actions/Application/UserMenuPopover.action"
}
],
"_Name": "ActionBar1"
}
}</code></pre><P>Now on selecting date i need to add two more formcell/buttontable in "SectionTable0".So can i do that when i have referred the reference link it is working but it opening the newpage with updated pageRef rather than i need to make it display on the same page after i add those ui controls dynamically. </P><P>pageProxy.binding is undefined</P><DIV><DIV><SPAN>clientAPI</SPAN><SPAN>.</SPAN><SPAN>getPageProxy</SPAN><SPAN>().</SPAN><SPAN>getActionBinding</SPAN><SPAN>(); is also undefined</SPAN></DIV></DIV><P>.</P><pre class="lia-code-sample language-javascript"><code>/**
* Describe this function...
* <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1387962">@Param</a> {IClientAPI} clientAPI
*/
import GetWeekDetailsFromDate from "./GetWeekDetailsFromDate";
export default async function FetchSelectedDateTimeBill(clientAPI) {
var selectedDateValue = new Date(clientAPI.evaluateTargetPath('#Page:Main/#Control:FormCellSelectCopyWeekDatePicker/#Value'));
const date = new Date(selectedDateValue);
const { startTimeBillDate, endTimeBillDate } = GetWeekDetailsFromDate(date);
//pageRef has complete page definition of the mentioned page
let pageRef = clientAPI.getPageDefinition('/DemoApp/Pages/Main.page');
let pageProxy = clientAPI.getPageProxy();
let object = clientAPI.getPageProxy().getActionBinding();
let currentPageControl = pageRef.Controls;
//adding a new action bar dynamically
let newFormCellTypeTwo = [
{
"Separators": {
"TopSectionSeparator": false,
"BottomSectionSeparator": false,
"HeaderSeparator": false,
"FooterSeparator": false,
"ControlSeparator": false
},
"Layout": {
"LayoutType": "Horizontal",
"HorizontalAlignment": "Leading"
},
"_Type": "Section.Type.ButtonTable",
"_Name": "SectionButtonTable22",
"Visible": true,
"EmptySection": {
"FooterVisible": false
},
"Buttons": [
{
"_Name": "SectionButton42",
"Title": "App Accelerator",
"Alignment": "Left",
"ButtonType": "Text",
"Semantic": "Tint",
"Image": "sap-icon://dropdown",
"ImagePosition": "Trailing",
"ImageSize": {
"Height": 20,
"Width": 20
},
"FullWidth": true,
"Visible": true,
"Enabled": true
},
{
"_Name": "SectionButton32",
"Alignment": "Center",
"ButtonType": "Secondary",
"Semantic": "Negative",
"Image": "sap-icon://delete",
"ImagePosition": "Trailing",
"ImageSize": {},
"FullWidth": true,
"Visible": true,
"Enabled": true
}
]
},
{
"Separators": {
"TopSectionSeparator": false,
"BottomSectionSeparator": true,
"HeaderSeparator": true,
"FooterSeparator": true,
"ControlSeparator": true
},
"Controls": [
{
"_Type": "Control.Type.FormCell.SimpleProperty",
"_Name": "FormCellMon2",
"IsVisible": true,
"Separator": true,
"Caption": "Mon",
"PlaceHolder": "0.00",
"Enabled": true,
"IsEditable": true
},
],
"Footer": {
"_Name": "SectionFooter1",
"Caption": "Total : 0.00",
"Visible": true,
"UseBottomPadding": true
},
"Visible": true,
"EmptySection": {
"FooterVisible": false
},
"_Type": "Section.Type.FormCell",
"_Name": "SectionFormCell2NewProj"
}
];
let updatedControls = currentPageControl.map(item=>{
if(item.Sections){
newFormCellTypeTwo.map((item)=>{
pageRef.Controls[0].Sections.push(item);
});
}
return item;
})
pageRef.Controls = updatedControls;
clientAPI.executeAction({
"Name": "/DemoApp/Actions/GenericNavigation.action",
"Properties": {
"PageMetadata": pageRef
}
});
}</code></pre><P> </P>2024-04-18T13:27:19.979000+02:00https://community.sap.com/t5/technology-q-a/sap-m-table-image-as-barcode/qaq-p/13674844sap.m Table image as barcode2024-04-18T15:38:32.315000+02:00JavierRubiohttps://community.sap.com/t5/user/viewprofilepage/user-id/1436086<P>Hello,</P><P>I am displaying a barcode per line item in a Table.</P><P>In the event '<SPAN>updateFinished' I am looping the table and using a formatter to create a barcode based on another table column's value.</SPAN></P><P><SPAN>The problem is that all the images are overwritten with the last one as shown below?.</SPAN></P><P><SPAN>Does anybody know why's that happening?.</SPAN></P><P><SPAN><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TableImage.PNG" style="width: 587px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/98251iD3524F517D5E3C70/image-dimensions/587x304?v=v2" width="587" height="304" role="button" title="TableImage.PNG" alt="TableImage.PNG" /></span></SPAN></P><P><SPAN>Thanks,</SPAN></P><P><SPAN>Javier</SPAN></P>2024-04-18T15:38:32.315000+02:00https://community.sap.com/t5/technology-q-a/print-array-in-email-fiori-application-webcontent-sap-build-automation-not/qaq-p/13682789Print Array in email, Fiori application - (webcontent) SAP BUILD automation, not working2024-04-25T20:00:51.520000+02:00ajay_sharma10https://community.sap.com/t5/user/viewprofilepage/user-id/184095<P>Hi,</P><P>I downloaded a project from SAP BUILD store, and it contains WebContent (html files) which triggered from workflow. I need to print table (array) in email.</P><P>In html file, I am able to print ${context.assetDetails.assetItem[0].fromCompanyCode} but not able to print complete table by using <script> </script> for table array $.context.assetDetails.assetItem. Code shown below.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="SAP Issue.png" style="width: 646px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/101978i666C4AC60C5F919A/image-dimensions/646x548?v=v2" width="646" height="548" role="button" title="SAP Issue.png" alt="SAP Issue.png" /></span></P><P> </P><P> </P><P> </P><P> </P><P> </P><P> </P><P> </P><P> </P><P> </P><P> </P><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-abap"><code><table id="assetTable">
<tr>
<td style="font-weight:bold">From CompanyCode</td>
<td style="font-weight:bold">From Asset Number</td>
<td style="font-weight:bold">Sub Number</td>
<td style="font-weight:bold">Asset Description</td>
<td style="font-weight:bold">From CostCente</td>
<td style="font-weight:bold">Capitalization Date</td>
<td style="font-weight:bold">**bleep**. Acquis. Value</td>
<td style="font-weight:bold">Accum. Dep. Value</td>
<td style="font-weight:bold">Net Book Value</td>
<td style="font-weight:bold">Transfer</td>
<td style="font-weight:bold">Amount Posted</td>
<td style="font-weight:bold">To CompanyCode</td>
<td style="font-weight:bold">To Asset Number</td>
<td style="font-weight:bold">Asset Sub Number</td>
<td style="font-weight:bold">Asset Description</td>
<td style="font-weight:bold">Asset Class</td>
<td style="font-weight:bold">To Cost Center</td>
<td style="font-weight:bold">Asset Status</td>
</tr>
</table>
<tr></tr>
<script>
populateTable();
function populateTable() {
const table = document.getElementById("assetTable");
var assetItem = [];
assetItem = $.context.assetDetails.assetItem;
assetItem.forEach(item => {
const row = table.insertRow(-1); // Inserts a row at the end of the table
Object.values(item).forEach(value => {
const cell = row.insertCell(-1); // Inserts a cell at the end of the row
cell.textContent = value; // Sets the text content of the cell
});
});
}
</script>
<tr></tr>
<td>${context.assetDetails.assetItem[0].fromCompanyCode}</td>
<td>${context.assetDetails.assetItem[0].fromAssetNumber}</td>
<td>${context.assetDetails.assetItem[0].fromAssetdescription}</td>
<td>${context.assetDetails.assetItem[0].cumulativeacquistionvalue}</td>
<td>${context.assetDetails.assetItem[0].cumulativeacquistionvalue}</td>
<td>${context.assetDetails.assetItem[0].accumulateddepreciationvalue}</td>
<td>${context.assetDetails.assetItem[0].netbookvalue}</td>
<td>${context.assetDetails.assetItem[0].transferPercent}</td>
<td>${context.assetDetails.assetItem[0].amountposted}</td>
<td>${context.assetDetails.assetItem[0].toCostCenter}</td>
<td>${context.assetDetails.assetItem[0].toAssetNumber}</td>
<td>${context.assetDetails.assetItem[0].toAssetSubNumber}</td>
<td>${context.assetDetails.assetItem[0].toAssetNumberDescription}</td>
<td>${context.assetDetails.assetItem[0].assetClass}</td>
<td>${context.assetDetails.assetItem[0].toCostCenter}</td>
<td>${context.assetDetails.assetItem[0].assetStatus}</td>
<pre>${context.internal.successMsg}</pre>
<pre>${context.internal.errorMsg}</pre>
<br><br>
<p>Thank You.</p>
</code></pre><P> </P><P> </P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FIORI.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/101984i2DD00FFB081F74F3/image-size/large?v=v2&px=999" role="button" title="FIORI.png" alt="FIORI.png" /></span></P><P> </P><P> </P>2024-04-25T20:00:51.520000+02:00https://community.sap.com/t5/technology-q-a/sap-analytics-cloud-custom-widget-testing/qaq-p/13685614SAP Analytics Cloud - Custom Widget Testing2024-04-29T11:17:15.023000+02:00THhttps://community.sap.com/t5/user/viewprofilepage/user-id/16393<P>Hello everyone,</P><P>I'm not an experienced developer and have just successfully developed my first custom widgets.</P><P>However, I found the testing process for my implementation to be cumbersome. Every time I added a new line of code or encountered an error, I had to delete the custom widget from SAC and re-upload the changed files.</P><P>Is there any way to test the code directly in the browser without having to delete and re-upload to SAC each time? Currently, the widgets consist of three JavaScript files for the main, builder, and styling, along with a JSON file. I attempted to test the script using a live server extension in VS Code, but without success (I'm also new to web components). I would greatly appreciate any advice or guidance on this matter.</P><P>Thanks & best regards</P><P>Tim</P>2024-04-29T11:17:15.023000+02:00https://community.sap.com/t5/technology-q-a/sap-ui5-dynamic-input-of-token-into-smart-table-multiinput-smartfilter/qaq-p/13701306SAP UI5 Dynamic Input of Token into Smart Table Multiinput SmartFilter2024-05-14T20:54:13.718000+02:00emil_lazarskihttps://community.sap.com/t5/user/viewprofilepage/user-id/324064<P>Hi,</P><P>I have an issue with the:</P><P>sap.ui.comp.smartfilterbar.SFBMultiInput</P><P>The scenario is following:</P><P>In a specific scenario I would like to add a new Token to the Multiinput of Smart Table SmartFIlter Bar. </P><P>Hence I prepared the following code: </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-javascript"><code>let oFilterBar = this.getView().byId("ZZZ--listReportFilter");
var aFilterItems = oFilterBar.getAllFilterItems();
const _ProductIndex = aFilterItems.findIndex(item => item.mProperties.name === 'Product');
let oEVControl = aFilterItems[_ProductIndex].getControl();
oEVControl.removeAllTokens();
let _newToken = new sap.m.Token({
key: VALUE.toString(),
text: VALUE.toString()
});
oEVControl.addToken(_newToken);</code></pre><P> </P><P> </P><P> </P><P>This is my understanding how one should be able to clear the filter and add new Tokens there. </P><P>However, the problem is as follows:</P><P>1. Tokens are not removed with .removeAllTokens().</P><P>2. Adding tokens with .addToken(_newToken) may add it as a value but running the app does not reflect a filter (all records are displayed regardless of the added filter). </P><P>3. There is no documentation for sap.ui.comp.smartfilterbar.SFBMultiInput. There is for: </P><P><A href="https://sapui5.hana.ondemand.com/#/entity/sap.ui.comp.smartfilterbar.SmartFilterBar" target="_blank" rel="noopener nofollow noreferrer">https://sapui5.hana.ondemand.com/#/entity/sap.ui.comp.smartfilterbar.SmartFilterBar</A></P><P>and for:</P><P><A href="https://sapui5.hana.ondemand.com/#/entity/sap.m.MultiInput" target="_blank" rel="noopener nofollow noreferrer">https://sapui5.hana.ondemand.com/#/entity/sap.m.MultiInput</A></P><P>I guess that the statement in sap.m.Multiinput is the answer to the problem:</P><UL><LI>Creating tokens in the control does not automatically update the model to which the "tokens" aggregation of the control is bound, no matter if the binding mode is set to "TwoWay". This is left to the application logic (check the corresponding sample).</LI></UL><P>but there are not details presented there. </P><P> </P><P>Thanks for hints.</P><P> </P>2024-05-14T20:54:13.718000+02:00