close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

DFP and Data Assist

Thread began 8/10/2009 3:19 pm by Steve | Last modified 8/12/2009 4:23 pm by Ray Borduin | 1435 views | 9 replies |

Steve

DFP and Data Assist

Hello,
Was working on another site to migrate from Adobe Developer Toolkit but find that an UPDATE page using the latest versions of DFP and Data Assist seem to lack the conditional means to NOT replace the file field values if no change is made to that field.

Is this something that will be improved soon? Seems a waste to have to create another page just to do an image upload if necessary because if the file field is not used it erases the current value by uploading null values.

In the meantime is there some work around???

What seems to be needed is that IF the file field has a value it should INSERT but if not changed/used that field should be excluded from the UPDATE process.

Sign in to reply to this post

Ray BorduinWebAssist

You should be able to set the default value of the upload to the current value of the field in the updated recordset. This is the value that is used if no file is included, so it should maintain the current value when set to that value.

Sign in to reply to this post

Steve

Ray, do you have an example? I've not seen a file field have a value element so not sure if we can just add one...

For example:

<input type="file" name="image" id="image">

Are you suggesting some means to pre-populate this with the current saved value, then only of a new file is selected it replaces this same content... ?

Sign in to reply to this post

Ray BorduinWebAssist

Edit the server behavior associated with the upload. There will be a default file field that you can use and refer to the recordset directly.

Sign in to reply to this post

Steve

Originally Said By: Ray Borduin
  Edit the server behavior associated with the upload. There will be a default file field that you can use and refer to the recordset directly.  




Ray,
It did not work....

The recordset and value are present but in the UPDATE it failed to insert the default value as expected.

php:
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
    'UploadFolder' => "../InvtryImages/",
    'FileName' => "[FileName]",
    'DefaultFileName' => $row_rstblinventory['InvImage'],
    'ResizeType' => "2",
    'ResizeWidth' => "650",
    'ResizeHeight' => "120",
    'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End



As a test to make sure there was nothing wrong with the basic INSERT routine, I tested and confirmed that when a selection is made, it uploads and updates the DB properly.

Sign in to reply to this post

Steve

Further tests also failed:

test 2: define default var outside the upload function:

php:
$default_file = $row_rstblinventory['InvImage'];

$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
    'UploadFolder' => "../InvtryImages/",
    'FileName' => "[FileName]",
    'DefaultFileName' => "[default_file]",
    'ResizeType' => "2",
    'ResizeWidth' => "650",
    'ResizeHeight' => "120",
    'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End



test 3 : test simple test string

php:
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(

    'UploadFolder' => "../InvtryImages/",
    'FileName' => "[FileName]",
    'DefaultFileName' => "test",
    'ResizeType' => "2",
    'ResizeWidth' => "650",
    'ResizeHeight' => "120",
    'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End



Both these failed so I have to wonder if the DefaultFileName parameter needs some further review in how it is executed in the HelperPHP.php file?

Reference:
PHP Version 5.2.9-2
MySQL 5.1.30

Sign in to reply to this post

Ray BorduinWebAssist

These two are not correct. You were on the right track in the first one.

Sign in to reply to this post

Ray BorduinWebAssist

What version of DFP do you have installed.... this setting appears to be correct:


'DefaultFileName' => $row_rstblinventory['InvImage'],

now, it is possible that the recordset is not on the correct row once the page submits to itself. That is probably why the tutorial has you add it to a hidden form element and refer to the hidden form element in the code.

That may be the solution... is the url paramater maintained through the submit so that the update recordset would be properly filtered?

Sign in to reply to this post

Steve

Originally Said By: Ray Borduin
  What version of DFP do you have installed.... this setting appears to be correct:


'DefaultFileName' => $row_rstblinventory['InvImage'],

now, it is possible that the recordset is not on the correct row once the page submits to itself. That is probably why the tutorial has you add it to a hidden form element and refer to the hidden form element in the code.

That may be the solution... is the url paramater maintained through the submit so that the update recordset would be properly filtered?  



DFP 2.0.1
DA 2.0.5

The example where I defined the var just prior to the behavior should work the same as a hidden field or better since the hidden field would be latter in the document and the recordset constructs prior to the behavior.

I tried the hidden field and that also failed. Where is this tutorial you are speaking of?

Sign in to reply to this post

Ray BorduinWebAssist

That is the latest version of DataAssist. I'll create a support incident for you so that an engineer can work with you and your files directly to determine the cause and solution.

I can't spot the problem without debugging since your earlier example seems correct.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...