Jump to content

text edit functions supported in expressions


Recommended Posts

Hello,
would be nice to have as text "editing" functions supported for make some custom attribute auto naming or renaming, based on other attributes, etc.
functions like :
REPLACE, UCASE, LCASE, CHAR_LENGHT, etc.


I am quite new here, so i don't know if this request have been already made or is on track, but that would be really helpful :)
Cheers

Eric

Link to post
Share on other sites
  • 3 months later...

Hello, thanks for your response.
Yes i saw the list of supported functions before create this thread, that is why i said that <<it would be nice to have>> some other "test editing" functions.
We have some dependencies between hundreds asset's names ans label attributes, so it would be useful to automatically create strings.
eg: if we have this kind of Label attribute, manually typed : "Parisian Aged Ground Pavement" we would like to be able to make a "Name" expression attribute that would automatically format it like this: "parisian_aged_ground_pavement"

I guess i can replace the " " by the "_" with the existing supported functions (it would be anyway more simple with a "REPLACE" function) but not possible to convert caps to lowercase.
I propose this because we have hundreds assets to manage on each project.

Cheers and as i am quite new to ftrack i would like to congrats everyone for your incredible tool ! Team begin using it and seems to really like it

Eric

ps: sorry for my english, i hope to be understandable :D

Link to post
Share on other sites

So here is the very beginning of an expression i have so far

:

{func.CONCAT(
   func.SUBSTRING(
      self.graph_label, 
      1,
      func.LOCATE(' ',self.graph_label)-1
   ),
   '_',
   func.SUBSTRING(
      self.graph_label, 
      func.LOCATE(' ', self.graph_label)+1, 
      func.LOCATE(' ', 
         self.graph_label, 
         func.LOCATE(' ', 
         self.graph_label)
      )
   )
)
}


So for the attribute Label "Parisian Aged Ground Pavement" it give me the attribute Name "Parisian_Aged Gro" but i still have caps

This is just a very beginning, not complete 😛


With REPLACE AND LOWER, i would have something like that :

{func.LOWER(func.REPLACE(self.graph_label, ' ', '_'))}


Regards

Link to post
Share on other sites
  • 2 weeks later...

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...