App Builder #
The following environment variables can be used in the App Builder
@wpda_wp_user_id | WordPress user ID |
@now | Current date (+ time) |
now() | Current date |
Notes #
- Variable @wpda_wp_user_id in default where (Table Builder)
- Variable @now as default value in the Form Builder
- Variable now() in default where (Table Builder)
- The user login and user email are still accessible through a query on the WordPress users table using variable @wpda_wp_user_id
Tables, Forms and Templates #
The following environment variables can be used in Tables, Forms and Templates.
$$USERID$$ | WordPress user ID (please update to @wpda_wp_user_id) |
$$USER$$ | WordPress user login |
$$EMAIL$$ | WordPress user email |
$$NOW$$ | Current date |
$$NOWDT$$ | Current date + time |
Environment variables can be used
- As default values in Project Templates
- In where clauses of Data Tables and Data Apps
Notes #
- Since version 5.2.3 the WordPress user ID is also available through session variable @wpda_wp_user_id for all local and remote database connections. This features allows plugin users to use the WordPress user ID in queries, views, database triggers and stored procedures. Custom values are supported as well and can be added using a hook. Read more…
Can $$NOWDT$$ be modified for local time zone?
Hi Mike,
$$NOWDT$$ should follow whatever time zone you set for your site in Settings > General > Timezone.
Let us know if you have more questions by sending us a message here: Contact Us.
I need to calculate a person’s age from their date of birth, but I’m having difficulty managing to do it, has anyone tried?
Thanks
Hi Rui,
Thanks for the comment!
Do you mean to calculate using SQL? You might find this source helpful.
Let us know if that helps. If you have more questions about our plugin, please send us a message here.