Exported Excel File

Shows some Tutorials

Exported Excel File

Postby Paradigm on Mon Apr 28, 2008 5:41 pm

When the data is backed on on excel, two columns automatically appear: 'cf_id' and 'uid'

What are these fields used for? I assume that they are unique identifiers for each record?

Is there a way of removing these columns all together? Or at least modifying them into something a little more meaningful?

Cheers.
Paradigm
Fresh Boarder
 
Posts: 3
Joined: Fri Apr 18, 2008 4:33 pm

Re:Exported Excel File

Postby GreyHead on Mon Apr 28, 2008 8:53 pm

Hi Paradigm,

These are control entries in the database. The cf_id is the record id and the UID is a unique ID - a random hash for each record. If you don't need them then you can delete them from the Excel spreadsheet, but *not* from the database table please or other things may break.

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3176
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:Exported Excel File

Postby pop_enygma on Thu May 29, 2008 4:28 am

Hi admin,

I have no problem with the form database and auto e-mail. But i have one question:

How to insert the cf_id in my e-mail template...?

For example, i've create a registration form. So, when people registered, then they will receive an e-mail about the details with registration reference number (which is number from cf_id maybe...)

I've try to insert {cf_id} in the email template. But it doesn't work...


Ok, that's all...
pop_enygma
Fresh Boarder
 
Posts: 3
Joined: Thu May 29, 2008 4:19 am

Re:Exported Excel File

Postby GreyHead on Thu May 29, 2008 12:23 pm

Hi pop_enygma,

I think that if you add this line to the bottom of your Autogenerated tab then you can use the $cf_id variable in your email template:
Code: Select all
$cf_id = $database->insertid();
It won't show as a normal field though so place
Code: Select all
<?php echo $cf_id; ?>
where you want to see it.

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3176
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:Exported Excel File

Postby vjr on Thu Jun 05, 2008 9:38 am

Hi.

I'm also interested in inserting cf_id in my e-mail template.
However, nothing is printed with:
Code: Select all
<?php echo $cf_id; ?>

in the e-mail template.

I tried to echo cf_id in the Autogenerated code and the correct value is displayed on the screen.

Any help appreciated.

Vitor Rocio
vjr
Fresh Boarder
 
Posts: 2
Joined: Thu Jun 05, 2008 9:33 am

Re:Exported Excel File

Postby GreyHead on Thu Jun 05, 2008 11:05 am

Hi Vitor,

Sorry, what I posted there won't work as the email is sent before the AutoGenerated code is run :-(

What do you actually want to do here? It might be simpler to generate your own unique id and save that in the database. Otherwise the fix is to send the email from the Autogenerated code tab which is possible but needs coding.

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3176
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:Exported Excel File

Postby vjr on Fri Jun 06, 2008 8:14 am

Hi, Bob.

Thanks for your quick reply.

Ok, I'll try to generate the id with an auxiliary table and php.

Vitor
vjr
Fresh Boarder
 
Posts: 2
Joined: Thu Jun 05, 2008 9:33 am

Re:Exported Excel File

Postby GreyHead on Fri Jun 06, 2008 8:53 am

Hi Vitor,

I'm sure that this has come up before - search the forums for 'id' maybe. I have a feeling that there's a solution posted here already a few months ago.

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3176
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany


Return to How To

Who is online

Users browsing this forum: Alexa [Bot] and 2 guests

cron