Ok for the ones interested, as in this case every answer is a new
answer you just have to generate a new uuid value to set the objectid
of the object:

<!--- if data exists show answer field --->

<cfif len(stobj.department)>

<cfset application.tai = CreateUUID()>

<ft:object typename="ticketanswers" objectid="#application.tai#"
lFields="answer" r_stPrefix="prefix" legend="Answer" />

 </cfif>

Then in the processform reformat the uuid so it matches the format
used in the form names:

<!--- if a answer was entered set to db --->

<cfif isdefined('application.tai')>

<cfset application.tai = replace(application.tai,'-','','ALL') />

 </cfif>

Then if the answer field was filled in, process the value in the db:

<cfif form[application.tai & 'answer'] gt 0>

<ft:processformobjects typename="ticketanswers">

<cfset stProperties.answer = form[application.tai & 'answer'] />
<cfset stProperties.ticketobjectid = stobj.objectid />

</ft:processformobjects>

</cfif>

Cheers

On Nov 30, 11:20 pm, Marco van den Oever <[EMAIL PROTECTED]>
wrote:
> I want to check if the answer form field "answer" was filled in,
> therefore i have to check on the form field name.
>
> The form field names have a uuid assigned to their name which is
> simply the objectid, but when you add a additional object then the
> form fields of that object all get a new uuid value assigned to them.
>
> How can i grab that new uuid value so i also can use it in a cfif
> statement i use?
>
> Below you see a form dump, the fieldnames of the object tickets have
> all :EE93D033FB0828DD12E6AB8742653DDF
> The fieldnames of the object ticketanswers have all:
> EF696EF7B53EF4D0EA063AC9479E2A75
>
> EE93D033FB0828DD12E6AB8742653DDFDEPARTMENT       EE7B4D0D-041E-80D9-
> CE7F039BB168EBD0
> EE93D033FB0828DD12E6AB8742653DDFDESCRIPTION     This happens when:
> EE93D033FB0828DD12E6AB8742653DDFDESCRIPTIONINCLUDE      1
> EE93D033FB0828DD12E6AB8742653DDFERRORURL        [empty string]
> EE93D033FB0828DD12E6AB8742653DDFNOTIFICATION    online
> EE93D033FB0828DD12E6AB8742653DDFOBJECTID        EE93D033-
> FB08-28DD-12E6AB8742653DDF
> EE93D033FB0828DD12E6AB8742653DDFPRIORITY        medium
> EE93D033FB0828DD12E6AB8742653DDFSUBJECT         Problem with:
> EE93D033FB0828DD12E6AB8742653DDFTYPENAME        tickets
> EF696EF7B53EF4D0EA063AC9479E2A75ANSWER  [empty string]
> EF696EF7B53EF4D0EA063AC9479E2A75ANSWERINCLUDE   1
> EF696EF7B53EF4D0EA063AC9479E2A75OBJECTID        EF696EF7-B53E-F4D0-
> EA063AC9479E2A75
> EF696EF7B53EF4D0EA063AC9479E2A75TYPENAME        ticketanswers
>
> On Nov 30, 9:25 pm, Marco van den Oever <[EMAIL PROTECTED]>
> wrote:
>
> > Awesome :) If anyone needs this also, check for a code example at:
>
> > farcry\core\webskin\dmProfile\edit.cfm
>
> > Cheers
>
> > On Nov 30, 8:22 pm, Matthew Williams <[EMAIL PROTECTED]>
> > wrote:
>
> > > There is something similar being done when you edit a profile (which
> > > I've been waiting a long time for ;)).  It sets and creates both a
> > > profile and a user object within the same screen.  Basically, in the
> > > submit section, you create both types of objects and insert the data via
> > > their stproperties.
>
> > > Matthew Williams
> > > Geodesic GraFX
>
> > > Marco van den Oever wrote:
>
> > > > I have a tickets type, and i have a ticketanswers type.
>
> > > > For the tickets type i have a custom edit so i am able to integrate
> > > > code for updating the ticketanswers type.
>
> > > > Ideal would be to edit a ticket and be able to also set the
> > > > ticketanswers type with the same "save" button. Then display all the
> > > > answers beneath.
>
> > > > I can make this a long story about how i already tried different
> > > > things as a redirect on button click or a additional
> > > > ft:processFormObjects typename="ticketanswers", but let me just ask:
>
> > > > How would you do this?
>
> > > > Thanks
>
> > > > ------------------------------------------------------------------------
>
> > > > No virus found in this incoming message.
> > > > Checked by AVG -http://www.avg.com
> > > > Version: 8.0.176 / Virus Database: 270.9.11/1820 - Release Date: 
> > > > 11/29/2008 6:52 PM
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to