DSL GUI rule

I feel incredibly stupid for asking this but searching has produced nothing thats helping

I want to create a DSL rule in the GUI but I cant work out how to get item details - using the old syntax doesnt seem to work

Here is a terribly simple “old” rule way of logging an item state

LedCount = PrusaMini_Progress.state

Can someone tell me how to do this?

You have to declare variables before using them.
logInfo() works with strings.

var LedCount = PrusaMini_Progress.state

It would grizzle in your openhab.log, which isn’t always that helpful but gives you clues where to start.

Thanks @rossko57, was hoping it was something simple(stupid), thanks for not flaming me either :slight_smile:

Im at a cross roads between keeping going with DSL and swapping over to javascript, but seems so much more syntax to do logging and getting item state I keep going back and forth between what to do

I thought the same about DSL but went with Javascript.
Yes it is confusing at first but it works well and the editor is good because when you press CTRL-SPACE it completes the command and also lists all your items etc.
See the screenshot example of what I mean.