how to let post-save helper know it's a new item?

0

I need a post-save helper to know if the pod-item just saved was newly-added. Is there a parameter that shows that? I can't seem to find one in either $params or $columns.

thanks, Scott

asked Jul 7 '11 at 3:50

scottnath

1

add comment
enter at least 15 characters

3 Answers

0

Try just using the built-in variable $is_new_item which is set to true if it's a new item, and false if it's editing an existing item.

answered Jul 9 '11 at 3:38

sc0ttkclark

2936

add comment
enter at least 15 characters
0

You can make a check if an item with this id already exists in Pods in pre-save helper, but in post-save you can only do a check if pod item was created in less than [x time] from now.

answered Jul 8 '11 at 7:44

Fike

208

add comment
enter at least 15 characters
0

You could compare the created and modified fields for the record. If they are equal, it must be a new pod.

answered Jul 8 '11 at 1:25

chris.pilko

889

add comment
enter at least 15 characters