Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
User avatar
By ariannovin
#824091
Hi
i want to have some general attributes or variables or configurations that in the user's processes i can use them to display data base on them.
for example i have a variable which indicates financial year, by changing the value of this variable by user some dropdowns in processes assigned to this user should be changed respectively.
thousand thanks in advance. :)
User avatar
By amosbatto
#824104
Create a PM Table (or a Table in your external database) which is named USER_OPTIONS and has the following fields:
ID (int, autoincrement, primary key)
USERNAME (varchar)
FIELD1 (varchar)
FIELD2 (varchar)

Add records to the the table that contain th options that you want for each user in FIELD1 and FIELD2.

Then create a Dynaform which has the following fields:
* Textbox with the ID and variable "currentUsername"
* Dropdown with ID "selectField1" which has the following SQL query:
SELECT FIELD1, FIELD1 FROM PMT_USER_OPTIONS WHERE USERNAME=@@currentUser
* Dropdown with ID "selectField2" which has the following SQL query:
SELECT FIELD2, FIELD2 FROM PMT_USER_OPTIONS WHERE USERNAME=@@currentUser

Then create the following trigger:
@@currentUsername = @@USR_USERNAME;

Set this trigger to fire before the above Dynaform.

See:
https://wiki.processmaker.com/3.1/Dependent_Fields
https://wiki.processmaker.com/3.2/DynaF ... SQL_Format
User avatar
By ariannovin
#824114
Many thanks for your comprehensive response.
unfortunately using pm table is not an option for me as i want to access it via normal users (they may have not access to that pm tables).
i want to have these configuration some where else which each user can access it and be able to modifies its values.
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]