Select to view content in your preferred language

Adjust arcade expression when running a model in ModelBuilder

632
1
Jump to solution
02-16-2024 04:39 PM
Labels (1)
RyanBohan
Frequent Contributor

I am working on building a model, and the request is to be able to change some of the variables when running the model.  I know this can be done by Creating a Variable --> From Parameter --> Expression; and setting that as a Parameter.

Ideally, I just want the first part of the arcade expression to be visible and adjustable.

RyanBohan_2-1708130189939.png

Currently it appears I am showing the entire arcade expression, which makes it a little hard for another user to adjust, also I can't prevent the user from changing the model logic in more ways than I wish to expose to the user.

RyanBohan_0-1708446455619.png

 

 

 

0 Kudos
1 Solution

Accepted Solutions
RyanBohan
Frequent Contributor

A coworker pointed me in the right direction for parameters.  Turns out you can use named variables in an arcade expression, by enclosing it within percents,   Ie %variable%.

var Residential = %Residential%
var Public_Facilities = %Public_Facilities%
var Tourism = %Tourism%
var Commercial_Area = %Commercial_Area%
var High_Traffic = %High_Traffic%
var Open_Space = %Open_Space%

RyanBohan_0-1708465607429.png

Leaving my question up, for anyone else runs into the same issue.

 

View solution in original post

0 Kudos
1 Reply
RyanBohan
Frequent Contributor

A coworker pointed me in the right direction for parameters.  Turns out you can use named variables in an arcade expression, by enclosing it within percents,   Ie %variable%.

var Residential = %Residential%
var Public_Facilities = %Public_Facilities%
var Tourism = %Tourism%
var Commercial_Area = %Commercial_Area%
var High_Traffic = %High_Traffic%
var Open_Space = %Open_Space%

RyanBohan_0-1708465607429.png

Leaving my question up, for anyone else runs into the same issue.

 

0 Kudos