# Sub Action in one Action problem

**URL:** https://community.mp3tag.de/t/sub-action-in-one-action-problem/56618
**Category:** Support
**Created:** [March 7, 2022, 12:58pm UTC](https://community.mp3tag.de/t/sub-action-in-one-action-problem/56618 "2022-03-07T12:58:08Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![olivierq02](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/o/8e7dd6/32.png) [@olivierq02](https://community.mp3tag.de/u/olivierq02)
#### Post date: [March 7, 2022, 12:58pm UTC](https://community.mp3tag.de/t/sub-action-in-one-action-problem/56618/1 "2022-03-07T12:58:08Z")

</div>

Hello,  
I created an action composed of 2 sub-actions:  
The first (export function) adds the selected tracks to a playlist for my squeezebox if this track is not already present in the playlist (PLAYLIST field empty).  
The second :  
Format field (PLAYLIST field = "General" (PlayList name)).  
Here is the problem :  
These 2 actions work very well alone but when I chain them only the format value action works.  
My export function does not work.  
I have had this case before with other actions. Grouping them into a single action poses a problem.  
If not, can we format a field (eg PLAYLIST) in an MTE file?  
This would allow me to have only one action.  
My MTE file:

$filename(txt,utf-8)$loop(%\_path%)$puts(test,$if($eql(%PLAYLIST%,'Général'),,'#EXTINF:'file:/$replace(%\_path%,'','/')  
'#EXTINF:'%\_length\_seconds%','%title%  
$replace(%\_path%,'\NAS','volume2','','/')))$get(test)  
$loopend()

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [March 7, 2022, 1:13pm UTC](https://community.mp3tag.de/t/sub-action-in-one-action-problem/56618/2 "2022-03-07T13:13:52Z")

</div>

see here:

> [@Export actions to be executed in sequence](https://community.mp3tag.de/t/export-actions-to-be-executed-in-sequence/50515):
>
> Is there a way to force Export inside Actions to be executed before other commands? I've read that it is coded this way, but I'd like to remove several tags AFTER the export, since if the exports runs at the end it won't have the necessary tags available. Any workaround would be appreciated.

---

<div class="post-metadata">

### Author: ![olivierq02](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/o/8e7dd6/32.png) [@olivierq02](https://community.mp3tag.de/u/olivierq02)
#### Post date: [March 7, 2022, 1:23pm UTC](https://community.mp3tag.de/t/sub-action-in-one-action-problem/56618/3 "2022-03-07T13:23:33Z")

</div>

Thank you ohrenkino for your reply.  
I didn't know that export actions are always executed after any other action has finished.  
So, is it possible to fill in the "PLAYLIST" field in my MTE file?

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [March 7, 2022, 1:26pm UTC](https://community.mp3tag.de/t/sub-action-in-one-action-problem/56618/4 "2022-03-07T13:26:23Z")

</div>

No, exports only read existing data (or process something temporally and locally).  
You can run a "Format value" action and an export action in an action group.  
What does not work: run the export first and then fill the field with a value.

---

<div class="post-metadata">

### Author: ![olivierq02](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/o/8e7dd6/32.png) [@olivierq02](https://community.mp3tag.de/u/olivierq02)
#### Post date: [March 7, 2022, 1:34pm UTC](https://community.mp3tag.de/t/sub-action-in-one-action-problem/56618/5 "2022-03-07T13:34:16Z")

</div>

Ok, I will create 2 separate action groups.  
Thanks again for your quick help.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [April 6, 2022, 1:34pm UTC](https://community.mp3tag.de/t/sub-action-in-one-action-problem/56618/6 "2022-04-06T13:34:28Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
