Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

multiple substitutions from scripted variable

Featured Replies

I have a script that loops thru [ go to next ] tab designated fields on a layout and generates a substitution list as such ;

"[\""&Get ( ActiveLayoutObjectName ) & "\"; " & Get ( ActiveFieldTableName ) & "::" & Get ( ActiveFieldName )&"];"

appending  "Substitute(report flow data::report" and  ")" at end  

(report flow data:: report) being a template loaded with "key words"

 

example;

 

Substitute(report flow data::report

["rdate"; report flow data::flowtest_date];

["rgpd"; report flow data::gallons per day;

["syaddress"; selected system::c_NameAndAddress];

["wdesc"; selected_water::c_waterDescBasic]

)

the key words to be substituted are the individual fields given name and for easy remembering that fields tooltip as well , is it possible to script edit the fields name thus  editing the "key word" 

 

This custom function "substitute data" substitutes with the scripted text chunk pasted into the function.

how to utilize variable $$sublist  in place of text chunk

apparently one can only substitute text ? it appears that a calculated number doesn't work.

substitute_function.thumb.png.0627361073

If $$subList is your compiled substitution code, then you probably mean

Evaluate ( $$subList )

Hi Tom,

Your explanation mentions both the field names and contents, and Variables?. In other words, to me it isn’t clear on what you want your end results to be.

You cannot change field names with a script. Scripts only work in browse mode.

So, if your intent is to change the Field Names, change them in Manage Database or on the Layout,  If you are looping through the records to replace the occurrences of rdate, systreet, etc, in your Fields, then your substitute seems to be ok.

Why not attach a sample file or copy of your current file to help us see the schema better?

Lee

 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.