I am working on a form where an end user can request a promo code. The promo codes are generated by the vendor and given to us, so I was hoping I could have them in a separate list, then have a workflow that pulls the next available one and assigns it to the new request once the form has been submitted. Is there a way using list lookups to make this happen? Thanks!
Hi,
1- Flag the promo code items (Add a "flag" field to promo code lists and set it to 0 by default).
2- Request form will pull the promo code item where "flag" field is equal to "0" by using a calculated value control:
Lookup("Promo Code List","flag","0","promo code")
3- Once form is submitted, the workflow will do the below:
A- Update all the promo code fields where "flag" is equal to "0" and set "flag" to "1".
B- Generate the new promo code item ("flag" is equal to "0").
4- The next form will pull the last generated promo code.
within workflow you can use in-place lookup of several actions, even eg. update item action
if conditions to identify suitable promo code from the other list a more complex you will need to use query list action to get the code.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.