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

How can i pass a dynamic URL value to a Link Widget at the Navigation Layout section ?

$
0
0
Hello, I'm working on a " Help/User Manual" utility which helps the users with information of the page when they click a Help Link at the top-right of the screen. So far, I could modify the navigation layout to add a link and a "Static URL" and it works. Problem 1:  i want to redirect the user to a different URL for each Page so that the help doc corresponds to a specific Mendix App page. Problem 2. I can compromise myself to bring the hyperlink from Navigation Layout to the page region under a data view(The data view will refer a domain model entity that holds URL and PageName). My questions: 1. How do i configure or pass a value to this "Help" hyperlink dynamically to address Problem 1? 2. Is there a variable to access current pagename such as "System.PageName" that can return MyFirstProject.Page1?

AudioVideoPlayBack

$
0
0
How to get values of total video time and time the video is played from Audiovideoplayback widget? Also how to use these values as maximum value attribute and progress attribute in progress bar ?

unique constraint or index violation while inserting data

$
0
0
We are occasionally getting the error below. It does not seem to hold up any processing and does not happen consistently. If I try to perform the same exact operation right after getting this it generally will not occur. Can anyone help decipher what the issue is? Thank you!   com.mendix.systemwideinterfaces.connectionbus.ConnectionBusException: Exception occurred while inserting data. (SQL State: 23505, Error Code: -104) Detail Message: org.hsqldb.HsqlException: integrity constraint violation: unique constraint or index violation; SYS_PK_11189 table: "esat$departmentline_employeeremote"   at ESAT.GetEmployeeRemoteInfo (Change : 'Change 'DepartmentLine' (DepartmentLine_EmployeeRemote)') Advanced stacktrace:    at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:143) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.connectionbus.ConnectionBusException: Exception occurred while inserting data. (SQL State: 23505, Error Code: -104) Detail Message: org.hsqldb.HsqlException: integrity constraint violation: unique constraint or index violation; SYS_PK_11189 table: "esat$departmentline_employeeremote"

SAML private key

$
0
0
When configuring the service provider I want to provide my own jks keystore.  But it looks like the key pair password of the private key  (where alias = entity id) has to be the same as the keystore password. If I choose some different key pair password for my private key I get an error after uploading and saving the SP configuration in the application : Er is een fout opgetreden tijdens het bijwerken van de configuratie: Unable to load the private key from the key store. If you have just added your own key store make sure the key store password is equal to the password configured in the model and add your key store again. When I set the password of the private key equally to the password of the keystore, I can upload and save it without error. Is this how it is expected?

403 error calling OData service from Mendix 'CSRF token validation failed'

$
0
0
Hello everyone, I am trying to call an OData service with a method POST, but I am getting a 403 error. First here are the other resources I found which helped a lot understanding the issue, but it's still not solved: https://docs.mendix.com/refguide/call-rest-action https://docs.mendix.com/howto/integration/consume-a-rest-service https://forum.mendixcloud.com/link/questions/62212 https://forum.mendixcloud.com/link/questions/82512 https://github.com/mendix/RestServices#rest-functions-overview https://www.mendix.com/blog/consuming-first-rest-service/ http://www.auraq.com/2017/01/09/an-example-of-using-restful-services-in-mendix-with-the-dropbox-api/   So to be able to use POST, I need to use a GET method first adding the header parameter "X-CSRF-Token = Fetch" to retrieve the token and pass it back to the following POST method. This is working great in Postman. However, when I try to do the same in Mendix, I am getting an error 403 on the POST Method. I tried using the Mendix "standard" Call REST activity, which works great but does not let me retrieve my the token from the header in the response of the GET call. I understand there is a session CSRF Token in the Mendix runtime variable "$currentSession/CSRFToken" but it does not seem to be the one from my Service, I tried to use it, but I got the same error. So as recommended in another forum discussion, I tried to use the Module RestServices from the App store, using it I am able to retrieve the token from the REST response header. I tried to pass the parameter "X-CSRF-Token" in the request header of the POST message, as I do in Postman, but the token I got from both method explained above was still getting me an error 403. FYI, when I use RestServices to get the token in the response header, the value of that token in different from the value of the runtime parameter "$currentSession/CSRFToken". For the Post method, I also tried both the Mendix "standard" Call REST activity and the java action "postWithResult" from the Module RestServices, passing the custom header parameter "X-CSRF-Token". In both cases I get the 403 errors, the log is a little different, I can actually get the following detailed message when I use RestServices: "Response status: 403 Forbidden, ETag: null, body: 'CSRF token validation failed'". Last but not least I checked my parameter syntax many times to be sure it was not the issue. So anyone here would have an idea where to look next? ... Adding some screenshots From Postman where it's working: And from Mendix where I get the error: I verified the GET is working and setting the token in the variable I am reusing in the POST.   Thanks in advance, Seb

How to do Mendix with high concurrent load (1000+ concurrent users)

$
0
0
We are working on a backend for a mobile app. On a schedule, a push notification is sent to all users (up to 200k) which then open the app. This causes massive peak loads. Static data requests are handled by the SpeedyRest module which we think is great. Dynamic data requests follow the normal REST flow. The most time consuming is the Prize endpoint. Users claim a prize at the prize endpoint. This claim needs to check if there is stock and if so associated it with the user. We are facing a couple of challenges: The stock update is currently not accurate. When peak load hits the stock sometimes even goes up. We are going to test with EndTransaction from the ObjectHandeling module. Any tips are welcome. We are unable to handle more than 400 concurrent requests. Any tips to get to 1000+ concurrent. To be able to answer this properly more context is needed. Though possibly people can share their experience with high traffic apps.  

How to access our test/production Mendix database and edit data

$
0
0
Hi, I need to edit data directly in the test/production Mendix database. I am not able to find the steps to do so. Please guide. Thanks.

Always redirect to a microflow on opening the mobile app

$
0
0
Hi,  I want to call a microflow(which will load data and open the homepage) every time the user opens the app on his phone. We have built hybrid apps for both android and the iPhone. The issue is, if the user goes to any random page and then minimizes the app, the next time when he opens the app, the last open page loads up and is unable to load the data(may be it's lost) and the users sees a error popup. Please suggest the best way to do carry this out.

ERROR - Core: An exception occurred while running the after-startup-action.

$
0
0
Hello, I am attempting to setup a Mendix instance for testing purposes. I've managed to set it up on EC2 place the database on on RDS instance. I got a dummy application to start/stop with m2ee-tools and I am able to visit it with a public URL. Once I moved onto uploading the database and inputing in constants for the actual test application, I started running into issues. I don't recall specifically what the prompt mentioned, but it asked to update the database. There were a few options I tried before saying "Yes" to the update. From there I ran into an error starting the application (after said update).. Attached the full log file, I'll insert a snippet of where the error starts below. 2018-02-05 17:29:01.887 ERROR - Core: An exception occurred while running the after-startup-action. 2018-02-05 17:29:01.887 ERROR - Core: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.NullPointerException at RestServicesCustomized.ACT_AfterStartup_InitializeREST (JavaAction : 'StartPublishesServicesJava') at Core.AfterStartup (SubMicroflow : 'Start REST') Full Advanced stacktrace in attachment: https://github.com/mendix/m2ee-tools/files/1696192/feb-5-logfile-m2ee.txt Java: 1.8.0_151

I am new to mendix development I am trying to consume a rest(Put) API . I am getting this error once I have selected Custom request template and pasting my request payload.

$
0
0
Braces should be followed by a number of digit or another brace. As of now I have hard-coded the request with all the parameters its a valid JSON request (works fine in postman). Thanks in Advance.  

Invoke external authentication service for login

$
0
0
Hi ,  I'm new to the platform . I want to create a login page where my authentication service is invoked on clicking login. Validation of the user and password is done by the external service. I have used a REST call action in a micro flow to achieve this. But I want to pass user name and password as dynamic parameters. Where should I store the username and password and how to pass them dynamically. Also how to design the form so that is reads the input values. 

Change Variable activity not displaying any Variables to select

$
0
0
Hi, Change Variable activity not displaying any Variables to select and unable to create a Microflows, I have created a ' Boolean Variable' and trying to add the validation by creating - Change Variable activity but unable to proceed further as the Change variable not displaying any values or variables.    Please help.   Thanks

Call a Mendix Rule from Java

$
0
0
I know it is possible to invoke a Mendix microflow from java by using the proxies.microflows.Microflow class. But for some reason I do not see rules in this class. Am I missing something or rules are just not included in this class? Also is there another way to execute a rule from java?  

Input Fields - how to change their input type in the HTML?

$
0
0
Hey, I'm trying to design a user friendly manual date picker, where a user enters the raw DD MM YYYY in input fields. To make this more mobile friendly i'd like to configure the Input type's html to be type="number" and/or type="tel". However it seems all inouts, even if the data behind the field is an integer value, default to type="text".   Is there a way to configure this in the modeler without using custom code?   Ta Luke

The given Queue with number: X was not found in the ThreadPoolManager

$
0
0
The processqueue is correctly working and implemented. After a while (days, weeks) the ProcessQueue configuration gets corrupt and stops working. Calling the java action AppendNewActionToQueue returns the following error The given Queue with number: X was not found in the ThreadPoolManager The problem can be resolved manual by: 1) make a copy from the corrupt processqueue configuration  2) delete the corrupt processqueue configuration  The manual solution isn't sufficient and preventing the configuration from getting corrupt would be way better. Comparing the corrupt and healthy processqueue configuration records does not provide an answer... Anyone an idea?  

Do domain model xpath constraints apply to microflows?

$
0
0
I was simply wondering if a retrieve activity in a microflow is always constraint by that what has been set in the domain model? Let's say I have two entities in my domain model: Teacher,  Group. As a teacher, I want to be able to only see the groups I have been assigned to. In such case, I make a domain model xpath constraint limiting Group access to the group I (as a teacher) have an association with. Now if I run a microflow as a teacher that contains a 'retrieve all Group objects', will it return all groups or only the ones that I have an association with?   - - - - For the record: If the answer is "Yes, constraint will apply to the microflow results as well", please elaborate. I just tested this and it is retrieving all groups, not just the associated ones..

Unable to scroll when opening Mendix Cordova app on iOS device

$
0
0
Hi all, Created a very simple app that was then deployed for Android and iOS using Phonegap for company App Store. The app is a simple list view of colleagues for use by anonymous users.  On Android everything works fine. However when opening the app on a iOS device, it won't properly load the list view (shows only the page header, search bar and half of the first card). After using the search bar (works fine and loads the cards corresponding to the search parameters) and resetting it again everything works as it should. Again, this problem only exists in the iOS version. Ideas on how to fix this issue?  Thanks in advance!   Cheers,  Yves

can formatDateTime() return day of week as a number?

$
0
0
If I use formatDateTime($Server_DateTime,'EEEE') I get the text of the weekday returned, such as Sunday, Monday... etc. I am using this value in subsequent flow to search for matching records. I am worried that this value is English language, and in otrher environments it may return the weekdays in different languages. I would prefer to be able to return the weekday as an integer, 0, 1 etc. Does anyone know of a function to return the DayOfWeek as an integer? I looked on http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html and tried formatDateTime($Server_DateTime,'F'), but that seems to return the week number in the month. In the parent Java DateFormat class there seems to be: DAY-OF-WEEK-FIELD public static final int DAY-OF-WEEK-FIELD (underscores replaced with hyphens by me) Can this be used in Mendix and if so, how? UPDATE after answer: I have tested and 'F' definitely returns the number of the week of the month, calculated from the 1st day of the month. SOLUTION after responses: Solved this by creating a Java action. Needed to add line near top of javasource (not in USER CODE section): import java.util.Calendar; then user code as follows: // BEGIN USER CODE Calendar cal = Calendar.getInstance(); cal.setTime(InputDate); int dow = cal.get(Calendar.DAY_OF_WEEK); String tmpStr = Integer.toString(dow); return tmpStr; // END USER CODE

SAP odata and cloud connector

$
0
0
hi all, I am trying to consume SAP odata service in mendix application. I am getting 403 error - Access denied to the system .Resources are not exposed correctly in the SCC. and XSUAA token is not generated for mendix user. But in my cloud connector resources are reachable and we are able to consume in other applications. But why mendix is unable to use those resources. Is there any configurations i need to do further? Kindly let me know the further steps. Thanks Thilagavathi   

Update objects in a list with looping query

$
0
0
I am trying to update records (objects) in a list with new values returned without changing the non-null values existing in the record already. I am looping through a list of tables and fields, and querying my database based on the new information. Each table is getting its specific fields, and returning the correct data. But, when I update the list of overall returned data, I cannot match up the new values with their already existing counterparts. For example, I query on Name from Table 1, and get a list of objects having the Name attribute populated. Then, on loop 2, I query another table and return values for Date of Birth. Those have a Name counterpart in reality, but if i use those values to update the list, I will either wipe out my existing Names or add new records with a blank Name but an existing DOB.  State 1:                         State 2:                                            What I want: Name | DOB |          Either:   Name | DOB  |     OR:    Name | DOB  |                 Name | DOB  |   Fred  |      |                  Fred  |        |                 | 2/6/78 |                 Fred  | 2/6/78|                                      | 2/6/79|      I tried to use the Change Object action to change each existing object in the list after each query has completed, but you need to select the fields statically, i can't pass in the list of fields that I just completed a query on into the action. If i select all the fields, it will update with null values where nothing was pulled, and I'll be back where I started.  What can I do to add my data to the existing object in the list to ensure the data lines up side-by-side after each iteration of the query in the loop? 
Viewing all 83469 articles
Browse latest View live


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