Accessing Custom Form data from within Trigger


(Jamie Smith) #1

Hello. I have a Trigger that sets a permission on a Form Submission asset when said asset is created in the Incomplete Submissions folder. I was previously doing this by getting the relevant LDAP user string from the POST data (I set the value manually in a field hidden from the UI).

 

However, now the form is going over SSL and the Trigger can no longer access the POST data.

 

Is there a keyword that I can use in the Set Permission action in the Trigger that will return the same value I was getting from the POST data?

 

I've set up Userid or Groupid mapping and tried, e.g., Current Asset > Keywordquestion_answer_123456_q10, and also Set Value%question_answer_123456_q10%, but to no avail.

 

I would try using the setPermission() JS API function but our version of Matrix (v4.14.1) doesn't have it.

 

Any thoughts gratefully received!

 

 


(Bart Banda) #2

Are you wanting to just set permissions on it based on the user who submitted the form? Or is it more custom?

 

Even though you are going over HTTPS, you should still be able to access POST data using %globals_post_foo% keywords. 


(Jamie Smith) #3

Are you wanting to just set permissions on it based on the user who submitted the form? Or is it more custom?

 

Even though you are going over HTTPS, you should still be able to access POST data using %globals_post_foo% keywords. 

 

Thank you for getting back to me, Bart. I'm setting permissions based on an LDAP string that's unrelated to the user who's completing the form.

 

Following your feedback, I looked again at the Trigger and got the value via POST Variable Nameq123456:q10. Not sure what was happening yesterday, as I'm sure that was how I was doing it originally  :unsure: