Hooks that check for unique identifier
Posted: 2016-02-08 13:24
hi
I am no php developer and taking on the challenge of using AppGini, however
need to be able to do the following for my company campaigns - I will
appreciate any help.
We have a dropdownlist that looks up list of 'campaign name description' each
and every campaign name description has it its own number range. What we would
like to do is so that the hooks looks up what is the next available campaign number
based on the dropdown selection and automatically creates the code after saved.
Example of the list:
ID | Campaign Description | Campaign Abbr.
1 Earn and Spend ES
2 Agile Promo AP
.........
19 Triggered Spend LT
Example 1:
Campaign Description: Earn and Spend - Campaign Abbr. ES and the
number 01. So typically the first one would be ES01, however if ES01 is taken
the next one should be ES02
Example 2:
Campaign Description: Triggered Spend - Campaign Abbr. LT and the
first number should be 01. So typically the first one would be LT01, however
if LT01 is taken the next one should be LT02
In summary:
I have a campaigns table where I want to select a campaign description from a lookup field, and then based on the campaign abbreviation + the code of the last similar campaign, the code field would be populated with the code of the new campaign.
I am no php developer and taking on the challenge of using AppGini, however
need to be able to do the following for my company campaigns - I will
appreciate any help.
We have a dropdownlist that looks up list of 'campaign name description' each
and every campaign name description has it its own number range. What we would
like to do is so that the hooks looks up what is the next available campaign number
based on the dropdown selection and automatically creates the code after saved.
Example of the list:
ID | Campaign Description | Campaign Abbr.
1 Earn and Spend ES
2 Agile Promo AP
.........
19 Triggered Spend LT
Example 1:
Campaign Description: Earn and Spend - Campaign Abbr. ES and the
number 01. So typically the first one would be ES01, however if ES01 is taken
the next one should be ES02
Example 2:
Campaign Description: Triggered Spend - Campaign Abbr. LT and the
first number should be 01. So typically the first one would be LT01, however
if LT01 is taken the next one should be LT02
In summary:
I have a campaigns table where I want to select a campaign description from a lookup field, and then based on the campaign abbreviation + the code of the last similar campaign, the code field would be populated with the code of the new campaign.