创建新话题
已回答

How to see if an attachement is added

Is there a way to see if an attachement is added without having to use dropdown menu?

image


Is there an attribute that can be added in grid that contains a symbol or character showing that one or several attachements are added?

image




最佳答案

 Hi Stefan,


Yes, there are several ways to see if an attachment (or a list of attachments) is added without having to use the drop-down menu and I will list two of them here, which are Tree view and Grid.


First: Tree view, there is no predefined attribute that you can use to view attached files however, you can use the Path language to do that, as shown below.

image

In the Add Filed Column, you need to enter:

?/item::.Select(Attachments).Join(',')

 ?                 Activate the path language.
/item::         
Navigate from a node to its item (because the tree view contains SystemWeaver Node).

.Select()       Transforms a list (item) into a new list(of attached files) by applying the given expression(Attachments) on each element in the first list.

Attachments Returns the attachments on an item or issue. Only the attachment objects are returned not the actual attachment data.

.Join(',')        Convert a list of strings to a string with a given delimiter.


Result:

image


Second: Grid view by adding a TextColumn that shows attachment files.

<Grid>
  <Columns>
    <ItemNameColumn width="200"/>
    <TextColumn caption="Attachment Files" width="200">#{?Attachments.Join(',')}</TextColumn>
  </Columns>  
  <ForEach select="/IDI">
  <Row/>  
  </ForEach>
</Grid>

 Result:

image

Similar to the Grid view you can add attachments to Report, if you are interested to know how, you can search for "ForEachAttachment" in the Help.


Best Regards

Bashar


回答

 Hi Stefan,


Yes, there are several ways to see if an attachment (or a list of attachments) is added without having to use the drop-down menu and I will list two of them here, which are Tree view and Grid.


First: Tree view, there is no predefined attribute that you can use to view attached files however, you can use the Path language to do that, as shown below.

image

In the Add Filed Column, you need to enter:

?/item::.Select(Attachments).Join(',')

 ?                 Activate the path language.
/item::         
Navigate from a node to its item (because the tree view contains SystemWeaver Node).

.Select()       Transforms a list (item) into a new list(of attached files) by applying the given expression(Attachments) on each element in the first list.

Attachments Returns the attachments on an item or issue. Only the attachment objects are returned not the actual attachment data.

.Join(',')        Convert a list of strings to a string with a given delimiter.


Result:

image


Second: Grid view by adding a TextColumn that shows attachment files.

<Grid>
  <Columns>
    <ItemNameColumn width="200"/>
    <TextColumn caption="Attachment Files" width="200">#{?Attachments.Join(',')}</TextColumn>
  </Columns>  
  <ForEach select="/IDI">
  <Row/>  
  </ForEach>
</Grid>

 Result:

image

Similar to the Grid view you can add attachments to Report, if you are interested to know how, you can search for "ForEachAttachment" in the Help.


Best Regards

Bashar

Liquid error: translation data {:other=>"%{count} 人 "} can not be used with :count => 1. key 'one' is missing.

Thanks Bashar!

登录 发表评论