Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderators: ArturoRobles, ArturoRobles

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.
Hi All

I have two questions.
1) How to insert null date in database.if the date is empty.
2) and how to insert date plus time from grid ( table ) into database.

Thanks in advance
By mishika

1. To enter a NULL value for date:
If you are using a PM Table, you need to tick the NULL column of the date field of your table. This will allow the field to store the NULL value.
In a trigger, check the value of variable x and fire the query accordingly. If you pass a value for the date, it will be set to that value. You can refer the following query:
Code: Select all
INSERT INTO PMT_MY_TABLE (NAME, PLACE, DATE) VALUES ('$name', '$place', '$date');
To set the value of the date as NULL, you can refer the following SQL query:
Code: Select all
2. To enter date plus time in database:
Take the DateTime field(say date1) in the grid(say gridVar001) and set its format to : YYYY-MM-DD, h:mm:ss
In the database take the DATE field of type DateTime.
And create a trigger which gets the value the date1 field of the grid and stores in the database.
An example of trigger can be as follow:
Code: Select all
@@d = @@gridVar001[1]['date1'];
$date1 = @@d;
$query = "INSERT INTO PMT_MY_TABLE (NAME, PLACE, DATE) VALUES  ('name', 'place', '$date1')";
@@res = executeQuery($query);
Hope this helps

Best Regards

Maybe try increasing your thread stack size? Seems[…]

I use PM 3.4. Android push works while IOS push do[…]

[quote=ziadeh post_id=823031 time=1550759948 user_[…]

I have to support reports in processmaker 3.4. A s[…]