Show/hide buttons depending on users interaction history

0
Hi everyone, my first post in the Mendix forum so here goes… Process background: I have been working with Mendix on a web application as well as a native mobile app that allows user to carry out audits. The user carries out one or more individual audits (linked to a specific project) and these records are stored. To carry out the audit the user is required to answer some predefined questions, giving an answer of Pass or Fail for each one. Because these questions rarely change, over time more experienced users know the questions off-by-heart so do not need to read the questions in order to complete the audit. Functional requirement: To save time, I want to offer the user a button that automatically marks all the questions with the answer “Pass” . BUT, I only want to offer this button once the user has achieved a minimum number of previously created audits. This means that only the most experienced users can skip reading and answering each individual question, whereas newer users will be forced to read and answer each question.  In addition, if any of the questions change/more questions are added, the button should disappear again until another minimum audit quantity has been achieved, forcing even an experienced user to familiarise themselves with these new changes.   My feeling is that I need to create some sort of reference table that counts how many records the current user has created in the database for the given project, and only make the button visible if this number is above a certain threshold (let’s say 200 records). Just to add complexity to this, the mobile app has been designed to run offline so this reference information needs to be a small enough dataset that it can be cached locally on the device…   If anyone has some ideas to start the ball rolling that would be much appreciated.   Thanks! Rabi 
asked
1 answers
1

Is it only one attribute and is this the only use case and is it a bad thing if not directly after the success on an offline app it is visible? Because then I would add an attribute on the account to check whether he can automate it or not. And set that attribute on the moment that they submit the form if they enter the threshold of the amount of questions answered since the last question was added. Then this can also be synched when they come online and do the calculation there and send back the resulted attribute to be cached on the mobile device.

Also on adding a question you can reset this attribute.

If you get more requests like this if they have performed these kind of actions, I would go a different route and not store it on the account directly but keep a seperate entity that you can link to the Account for these kind of configurations.

answered