Attachments (to SQL table) using smartforms

  • 7 March 2014
  • 5 replies
  • 11 views

Badge +2

 


1. I have created a SQL Table with attachment field as nvarchar(max) 


2. I created smartobject and changed the attachment field type from Memo to File File Type 


3. Added the ListView to the form 


4. Added rule to View List method to get the records in the listview also added rule to create /update and delete when saving.


 


 


I can see the file saved in the table.


 


Here is my question.


How do users open the attachments from the list view? The file attachment control just let you upload the attachment only.


Please advise me.


 


Thanks Venketesh


 


5 replies

Badge +6

Hi Venketesh,


 


Once you have populated records into the SmartObject - this can be done either using a Item View or an Editable List View, you would then be able to view the uploaded attachments via the List View. 


 


Regards,


Taariq

Badge +2

List View it shows as File Type and shows the attachment folder which opens up the folder and expecting to select a file instead of open the attachment.

 

 

Venky

Badge +7

The control on the list view may not be reading the data correctly if it opens up a folder instead of the data.

 

I had a tough time with this one.  I struggled so much with K2 smartobject intially reading the datatype as a memo that I built a secondary smartobject out of a smartbox solution.  I tried to replicate your scenerio on my end and it couldn't even read my new datatype as a file.  

 

I'll try to run this again tomorrow.  Basically, if your data in SQL is loaded correctly and K2 can read it, the list view will display the link to the attachment instead of the "click to attach file" control.

Userlevel 4
Badge +13

Hi Vsubramony


 


I have reproduced the scenario you described and found that when you click on the Attachment that has been added, it starts to download (this happens if either the View or the Form is run) the attached file which you can then view as a user.


 


Steps Taken:


1. Recreate Scenario


2. Add a Record as a attachment.


3. Save the record and refresh to confirm that is has been saved


4. Click on the attachment link in the record


14227i9EA9568CC5B44C8C.png


 


5. Click on the Show Downloads in the bottom right (If using Chrome Browser)


15812i72C06A0C85794519.png


 


6. A Downloads tab would open listing all your downloads


7. When the file has completed the download. Click on the name of the File to open it.


17003iAEF2348A4567A5B8.png


 

Userlevel 4
Badge +13

Hi Vsubramony


 


Please confirm if my reproduction was able to help in the question you had regarding "How do users open the attachments from the list view? The file attachment control just let you upload the attachment only."?


 


Thank You in advance.

Reply