Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
Jas

Senior Veteran
Registered:
Posts: 429
Reply with quote  #1 
Hey Guys

Does anyone know how to get the filenames from a mutliclip clientside / before the form has been submitted?

I can get the the number of files using getRowCount but getCell doesnt work.

Thx
0
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #2 
If you go straight to the eattachment table, eKey is the folderid + filename so you could parse out the name that way.
0
Jas

Senior Veteran
Registered:
Posts: 429
Reply with quote  #3 

Should have made my post clearer. I was hoping to grab the file names through a clientside script on form submit (guess I could have a memo with a select on the table but seem to recall doing this previously just cant recall how.

0
praxkan

Veteran
Registered:
Posts: 142
Reply with quote  #4 
It is possible client-side but its not pretty :). You're gonna end up hacking into the telerik control behind the grid and it might break in future versions.

Is there a specific reason why you want to do it clientside and not server side?

Getting it from eAttachment is cleaner and more reliable. Attachments are uploaded to eAttachment rightaway, so you dont have to worry about wrong counts
0
ka_rouse

Member
Registered:
Posts: 16
Reply with quote  #5 
Bringing up this old post, but I ran into the same issue, basically the getRowCount worked for me, but the getCell returns a blank value por the Multi-Clip control.

I want to do it client side, because I want to warn the user's before submitting the form of the format of the file that they are uploading.

Does anybody know why the getCell function does not work with this control, or if there is a work around to do the above?

Thx
0
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #6 
This is what i do under "When action completed" for any action that has any type of attachment box.  It's slightly different than what you're looking for but it's the cleanest/simplest solution I've been able to come up with.  This would allow a user to attach as many files as they want, and it won't alert them that there's an issue with them until they try to submit the form.  But this will prevent submission until the files are removed.  The downside, they can still hit "Cancel" and the attachments will still be on the form.  So if you have a separate "Add attachments" action, they can attach the wrong file, hit cancel, then continue the process through the regular actions.


if (Mstm.SelectSql(new MetastormDefault(), "SELECT COUNT(*) FROM eAttachment WHERE eKey LIKE '%"+ProcessContext.FolderId+"%.exe%'").Integer>0)
{
  ProcessContext.UserError = "You can NOT attach any executable files.  Please remove the executable file.";
}


What a horrible solution...  I hope my end users don't figure that out.  Though i guess i could just add this to every action to make sure the attachments stay clean.
0
ka_rouse

Member
Registered:
Posts: 16
Reply with quote  #7 
Thanks JoeOmerta for your response!

That is what I was afraid of, seems that it can't be done client side. Actually I got it running doing something similar as you coded bellow, but indeed, it has to be added to each action
0
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #8 
I wonder if you could throw in a conditional action on a common stage linked to all stages and just have the conditional action constantly check the attachments table and throw an error if so.  But that might not stop it from going through the process with a bad attachment.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!