Welcome Guest

Pages: 1
Action – Tests (if-else-statements)
PowderPostMay 28, 2013, 16:56
Pro
Posts: 116
Registered:
March 4, 2013, 18:53
Normal topicAction – Tests (if-else-statements)

I don’t really understand the concept of the function called »Test«.
Does every function return true on success and false on failure?

I would like to build the following action:

Check if all fields Artist, Title, Album, Tracknumber, Publisher, Year and Custom: CATALOGNUMBER are not empty.
If at least one of them is empty:
run action A
run Discogs Wizard (or let me enter the mostly missing Publisher and catalog# by hand)
run action B
else (all fields have something in it):
run action B
move files to …
create symlinks…

Something like a if-else statement would be very useful. If I get this right the test function is something like that but you cannot proceed with another action on the else-case.

2MR2PostMay 28, 2013, 22:05
Avatar photo
Administrator
Posts: 2079
Registered:
August 23, 2012, 19:27
Normal topicRe: Action – Tests (if-else-statements)

All functions which end with the word 'Test' return a true/false condition code.

The Test function is used to implement the test of the condition code.

If-then-else is typically executed as follows:

...set condition code
Test True Run action 'action-to-process-true'
Test False Run action 'action-to-process-false'

There is no action function to invoke the Discogs or MusicBrainz wizards (currently). When an action breaks to the UI you can manually edit fields. If you want to force an unconditional break to the UI, use an Ask function. When ready to resume the action hit the True or False button.

I hope this helps.

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.019 seconds.