Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Random Number in a DCR
NickAustin74
How does one put a random number into a dcr's replicant field? I am using datadeploy and I need to set-up a key field for an FAQ template I am making. The problem is each q/a pair needs to have an FAQID associated with it, but I have found no way to get teamsite to generate a random numnber within the DCR.
<item name="faqid">
<label>FAQID</label>
<database data-type="VARCHAR2(50)">
<test required="t" size="51" maxlength="50">
</item>
Mind you this is part of a replicant.
Find more posts tagged with
Comments
Jeremy
Hi,
Just a suggestion - not sure if it would work or if it is what you are looking for, but instead of a random number couldn't you use a sequential number generated by the DB?
To get this you could have an inline callout in the DCR as a hidden field. Each time a new replicant is added it should run that inline callout. What it would do is go to the DB and get the next value.
I am sure it is similar to being a random number, but not too sure how much more work it would be for you.
Just a suggestion.
Jeremy
Migrateduser
Hi Jeremy,
I'm also working on something similar to it. i tried doing it the way u suggested but doesn't seem to work. could you please attach the code as to how to go about it?
it would be of great help.
thanx