Quantcast
Channel: Mendix Forum Questions
Viewing all 83469 articles
Browse latest View live

No event handlers for non-persistable entities in Studio Pro (beta 2)

$
0
0
I cannot add any kind of event handlers in Studio Pro (8.0.0 beta 2). When making the entity persistable it works (after closing and re-opening the page).   This works in the Desktop Modeler (7.23). When I make the entity persistable, add an event handler, and make it non-persistable again the event handler is stored and actually working. (This work-around does not work so well when you already have specified an Entity to inherit from, which itself is marked as non-persistable.) Is this a bug in Studio Pro?

Associations help

$
0
0
Hi all We are creating an app which will allow care workers to track epileptic seizures.  I currently have the following entities People we support have their own unique types of seizure (so linked PWS 1- * Types) We track every seizure so that is linked also linked (PWS 1-* Seizures) I also need to link seizures to a type of seizure, but they can only be linked to types that the person we support has. 

Error when connecting odata service to SAP platform

$
0
0
Hi everyone,  I want to connect my application to a SAP platform which is already using odata v4. I am aware that Mendix is currently using v3 and that it isn’t really supporting a connection to v4, but is there a possibility to change the metadata of the odata service that I’ve created within the Modeler? I’m getting the following error message from the SAP platform when trying to connect to my odata service:   “An error occured while parsing service metadata: invalid or missing namespace for ‘Schema’.“   Many thanks in advance, Laura

List Display

$
0
0
Hello All, I have implemented List operations in a microflow to search for Duplicate objects, the output, i.e; end event returns a list as an output. how do I display this list in a page or any data source. I have tried calling the microflow in a page on a data grid, I get an error saying I Cannot pass an object as an Input parameter.

Using a custom widget to add click events on a standard mendix button

$
0
0
I would like to extend the behavior of the mendix button on the templategrid toolbar. I have created a mendix custom widget and would like to add a click event on the “select all” button. This appears to be impossible. I read that mendix does not allow custom widget to access standard mendix widgets. Is there a walk around?

Filter the output

$
0
0
My domain model contains list of user details which includes date of registration of user to my app. Domain Model- Now in a one page what I want to do is there are two options for admin to give start date and end date .. When he picks date for start and end date using datepicker...My list should get filtered as it shows only those users that are registered within start date and end date…   I have written one microflow as below… Also for retrive objects I added x-path constraint as follows.     But I am not getting how to show this list on a page..which widget to use so that I can return list from microflow….Or any news ideas are welcomed.....Also when I again change start and date ...The result should get filtered as per current condition...

Database Replicator Error with SQL syntax

$
0
0
Hi Community! I am having trouble with the Database replicator module when connecting to an MSSQL database, it appears that the SQL Syntax that the module is using is not accepted by the server (error output below), i was wondering if anyone knows how to change the actual query that is being sent to the SQL server by the module as i need to change the part where it says [SysObjects] to sys.sysobjects in the code: “SELECT  '2' AS [05908765-e] ,  '2' AS [DbId] ,  [mainTable].[name] AS [Name]  FROM [SysObjects] AS [mainTable]  WHERE  (mainTable.[type] = 'U' OR mainTable.[type] = 'V') “ Thanks for your help!   full error code: Exception synchronising database:  - -------- com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: replication.ReplicationSettings$MendixReplicationException: Could not execute query on the external database, the message is: Invalid object name 'SysObjects'., the executed query is: SELECT  '2' AS [05908765-e] ,  '2' AS [DbId] ,  [mainTable].[name] AS [Name]  FROM [SysObjects] AS [mainTable]  WHERE  (mainTable.[type] = 'U' OR mainTable.[type] = 'V')   | VERSION: Mx5_20161013     at com.mendix.basis.component.InternalCoreBase.execute(InternalCoreBase.java:418) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: replication.ReplicationSettings$MendixReplicationException: Could not execute query on the external database, the message is: Invalid object name 'SysObjects'., the executed query is: SELECT  '2' AS [05908765-e] ,  '2' AS [DbId] ,  [mainTable].[name] AS [Name]  FROM [SysObjects] AS [mainTable]  WHERE  (mainTable.[type] = 'U' OR mainTable.[type] = 'V')   | VERSION: Mx5_20161013     at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:159) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: replication.ReplicationSettings$MendixReplicationException: Could not execute query on the external database, the message is: Invalid object name 'SysObjects'., the executed query is: SELECT  '2' AS [05908765-e] ,  '2' AS [DbId] ,  [mainTable].[name] AS [Name]  FROM [SysObjects] AS [mainTable]  WHERE  (mainTable.[type] = 'U' OR mainTable.[type] = 'V')   | VERSION: Mx5_20161013     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) Caused by: replication.ReplicationSettings$MendixReplicationException: Could not execute query on the external database, the message is: Invalid object name 'SysObjects'., the executed query is: SELECT  '2' AS [05908765-e] ,  '2' AS [DbId] ,  [mainTable].[name] AS [Name]  FROM [SysObjects] AS [mainTable]  WHERE  (mainTable.[type] = 'U' OR mainTable.[type] = 'V')   | VERSION: Mx5_20161013     at databasereplication.implementation.DatabaseDataManager.startSynchronizing(DatabaseDataManager.java:72) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'SysObjects'.     at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217)     at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1635)     at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:865)     at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:762)     at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:6276)     at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1793)     at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:184)     at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:159)     at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQuery(SQLServerStatement.java:661)     at databasereplication.implementation.DatabaseDataManager.startSynchronizing(DatabaseDataManager.java:66)     at databasereplication.implementation.DbReader.SQLServerReader.processTables(SQLServerReader.java:55)     at databasereplication.actions.SyncDatabaseInfo.executeAction(SyncDatabaseInfo.java:51)     at databasereplication.actions.SyncDatabaseInfo.executeAction(SyncDatabaseInfo.java:28)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:79)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:57)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:55)     at com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(ActionManagerBase.java:150)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:155)     at com.mendix.basis.component.InternalCoreBase.execute(InternalCoreBase.java:414)     at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:56)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:201)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:79)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:57)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:55)     at com.mendix.basis.actionmanagement.DefaultActionMonitor$.$anonfun$run$1(CustomMonitoredAction.scala:18)     at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.IMonitoredAction.monitor(IMonitoredAction.scala:49)     at com.mendix.basis.actionmanagement.IMonitoredAction.monitor$(IMonitoredAction.scala:25)     at com.mendix.basis.actionmanagement.CustomMonitoredAction.monitor(CustomMonitoredAction.scala:22)     at com.mendix.basis.actionmanagement.DefaultActionMonitor$.run(CustomMonitoredAction.scala:18)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.runMonitoredAction(CoreActionHandlerImpl.scala:68)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:55)     at com.mendix.basis.actionmanagement.AsyncExecution.$anonfun$call$1(AsyncExecution.scala:21)     at scala.util.Try$.apply(Try.scala:213)     at com.mendix.basis.actionmanagement.AsyncExecution.call(AsyncExecution.scala:21)     at com.mendix.basis.actionmanagement.AsyncExecution.$anonfun$execute$1(AsyncExecution.scala:17)     at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:658)     at scala.util.Success.$anonfun$map$1(Try.scala:255)     at scala.util.Success.map(Try.scala:213)     at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)     at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)     at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)     at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)     at java.lang.Thread.run(Thread.java:748)  

SAP Single Sign On fetch surname instead of only name

$
0
0
Hey everyone,  my application uses SAP Single-Sign-on and fetches various employee data when they log on.  I want to display some of that data in an addressbook, including name and surname.  The names should be stored in the attribute “FullName” in an entity, that inherits from System.User.  However, only names (and no surnames) are stored in “FullName”. Is there a possibility to not only fetch the name, but also the surname?    Kind regards   Jan 

Toggle buttons instead of radio inputs

$
0
0
Dear community, as I use a lot of radion-buttons (mostly with 2-3 choices) – I was wondering if it would be possible to change the “look” of the radiobuttons to something like 2 or 3 buttons next / or below to each other. A bit like this: http://codepen.io/samkeddy/pen/PbROLK/ or even this: https://codepen.io/adamstuartclark/pen/pbYVYR/ I tried to add some of the CSS code from the examples to my project and assigned the corresponding class to the radiobutton object – but it doesn’t work. Has anyone experience with such things? Thank you very much

AnyChart JSON structure

$
0
0
Hi all,  Here is a JSON example of what will populate an anychart scatter and line plot var trace1 = { x: [0, 1, 2, 3, 4, 5, 6, 7, 8], y: [0, 1, 2, 3, 4, 5, 6, 7, 8], name: 'Name of Trace 1', type: 'scatter' }; var trace2 = { x: [0, 1, 2, 3, 4, 5, 6, 7, 8], y: [1, 0, 3, 2, 5, 4, 7, 6, 8], name: 'Name of Trace 2', type: 'scatter' }; var data = [trace1, trace2]; var layout = { title: { text:'Plot Title', font: { family: 'Courier New, monospace', size: 24 }, xref: 'paper', x: 0.05, }, xaxis: { title: { text: 'x Axis', font: { family: 'Courier New, monospace', size: 18, color: '#7f7f7f' } }, }, yaxis: { title: { text: 'y Axis', font: { family: 'Courier New, monospace', size: 18, color: '#7f7f7f' } } } }; Plotly.newPlot('myDiv', data, layout);   I’m still a bit unclear about Mendix’s JSON Structure feature. Does anyone know if the above can be put into a string attribute that the graph widget will read? With the “Name of trace” , X and Y values being pulled from the database? 

Visibility of User Roles with data from Single Sign On from SAP

$
0
0
Hey everyone,    the users of my application are using SAP Single-sign-on to log on. Everyone with access to the application has a dedicated role.  I want to display that role in an addressbook. However, there is an XPath Constraint in the corresponding attribute allowing users to only see their own role. This XPath constraint (or rather the whole domain model) is non editable.  Is there any possibility to make changes to the domain model (and respectively the constraints)? Does anybody know about a workaround?   Thank you! Kind regards   Jan   

Database migration MSSQL to Postgres error

$
0
0
We have an application running on premise connected to a mssql database server and want to migrate the application to the cloud. One part of this, is migrating the database from MSSQL to Postgres. According to https://docs.mendix.com/howto7/data-models/migrating-your-mendix-database this should be a simple step ;).  Unfortunately  we are running into some issues with the data that is in the MSSQL database. During the migration (done by the modeler) we are receiving the following error: "invalid byte sequence for encoding "UTF8": 0x00".  Since MSSQL does not understand UTF8, the data is stored a different pagecode/encoding. I guess win1252 since this is the default for mssql. Because of the error, the migration stops ofcourse. What is the best thing we can do to fix this issue? Is there any way that mendix can do a data conversion from WIN1252 to UTF8 before putting the data into the UTF8 postgres database? I don't see any options for this in the documentation….  Another solution would be to use a thirdparty tool for the database migration, which maybe can give some other errors in combination with Mendix. Therefore i want to use Mendix default if possible. Application is on mendix 7.15.1

Datagrid Styling

$
0
0
Hi All I am trying to style a row in my datagrid based on an attribute.  I want to change the color of a row when the date is older than 10 days. 

I cant open one of my domain models. i get a System.Drawing.Graphics.CheckErrorStatus(Int32 status) error.

$
0
0
Hi there   I cant open one of my domain models. i get a System.Drawing.Graphics.CheckErrorStatus(Int32 status) error.   Has anybody had this before.      

Xpath Constraint

$
0
0
Hello, I am try to accomplish is to have users be only able to view records based on a group.  Example.  I have 3 entities.  WorkOrder, Business Unit and Teams.  Work Order has a Business Unit attribute and Teams is associated to business unit.                                                                                          What i want is as a user is assigned to a team, that they can view only work orders base on the business unit assigned to that team.  I have done this with a microflow on a list view and got it to work but by doing so, i cannot use a  search function.  I don’t want to use a data grid as it will mean we will have to revamp the list view page we currently have designed.  Can this be done by Xpath constraint on a list view?  If i have use the microflow I created is there a way i can have dynamic filter on a “list view by microflow” page?    

Calculated Attributes - Refresh Fequency

$
0
0
Hi I’m using a calculated attribute in a child entity for conditional visibility that’s actually based on an attribute in a parent entity (which can’t be directly accessed by visibility rule in the child or pages based on the child)... Data Model Client (entity) - ClientType (enumeration attribute with values Child, Parent, Other) ClientAssessments (entity) - ClientTypeCalc (calculated based on ClientType in Client entity above). This calculated attrib enables visibility controls in UI elements based on ClientAssessment.   Use Case pagClient enables ClientType to be updated. In practice, once a ClientType is set, it won’t change, but I have to allow for data entry errors. - pagClient has a data grid for ClientAssessment, which is used to edit selected ClientAssessments by opening pagAssessment. pagAssessment has n tabs of various types of assessments, where each tab’s visibility needs to be controlled by ClientTypeCalc. 1, 2 or 3 of the ClientType values can satisfy the visibility requirements in order to display any given tab. For example, Assessment A may be used for just a child, whereas Assessment B may be used for both a child and a parent.   Original Issue  This design works fine, unless I change ClientType in pagClient. ClientTypeCalc does not refresh unless I exit and restart the app.   Current Solution (based on suggestions below) When I open pagAssessment, I’ve added an on-click-edit microflow that commits the selected ClientAssessment and then opens pagAssessment. This seems to trigger a refresh (noted in Mike’s and Tim’s answers), so the ClientTypeCalc attribute is now correctly updated.   Question I can’t get around the business requirement to manage visibility based on attributes that are not in the current object. My current solution is spreading the logic across a calculated field and a micrflow, which isn’t the most elegant solution.  - Is there a better way to handle this requirement? - does anyone know if Mendix is planning to add more event handlers, esp on UI objects (e.g. on-open events)? while an on-click-edit event may seem like it’s the equivalent of an on-open, the problem with the current solution is that the child page (pagAssessment) can be called from multiple other pages.  

Bar ChartJS showing same visualization despite having different aggregated values for each month?

$
0
0
Here is the data of two months attached : Below is the microflow that i have used ? Why do i still get errors? Or is there something that i have not added/changed?

ChartJS value at center of a pie chart

$
0
0
Hello, I’m currently using ChartJS pie chart and I want to have my value displayed at center of the pie chart. How to achieve this ? Thank you :)

com.mendix.core.Core.retrieveXPathQueryAggregate: SUM/AVERAGE

$
0
0
Hello again I know how to do COUNT var query= " //"+table+ " ["+ " createdDate>="+t0.getTime()+ " and"+ " createdDate<"+t1.getTime()+ " ]"; var count; var size; var count=com.mendix.core.Core.retrieveXPathQueryAggregate( root.getContext(), "COUNT("+ query+ ")" ); I’m a bit unsure about SUM/AVERAGE/ETC however, it seems to deliver results that do not seem correct var op="SUM";//AVERAGE/ETC var query= " //"+table+"/"+attribute+ " ["+ " createdDate>="+t0.getTime()+ " and"+ " createdDate<"+t1.getTime()+ " ]"; var count; var size; var count=com.mendix.core.Core.retrieveXPathQueryAggregate( root.getContext(), op+"("+ query+ ")" );  

Alignment for list items

$
0
0
Hello Every One, My output is like this    This output is by listview ...I want to make it as  Tag  mendix , reference-selector  How to do this ?
Viewing all 83469 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>