Jump to content

multiple substitutions from scripted variable


This topic is 3107 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

This topic is 3107 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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