naming rule input

Certified Associate Developer

Hello Appian Community,

I have a question about the exercise in the Appian 20.1 Developer Skills Practice Guide.

The instruction says to rename a rule input in a form witch is generated based on a custom data type VFM_Vehicle.

The autogenerated name is VFM_Vehicle so the same as the Date Type, the instructions say to rename it to vehicle because thats best practice for naming variables.

In the following steps in the instructions the variables of the Date type are called like ri!VHM_Vehicle.category and ri!_Vehicle.mileage.

I my situation this results in an error because i renamed to vehicle, so i must use ri!vehicle.category an ri!vehicle.mileage.

So this seems a mistake in the instructions, but now i wonder what is best practice in this situation. VHM_Vehicle or vehicle. Is it VHM_Vehicle because its an object? or is vehicle the correct naming?

Kind Regards,

Erik

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Associate Developer
    in reply to TJ

    Thanks you, is it best practice tot name the variabele camelcasing, of should i user camelcasing voor the variabele insider the CDT and use the prefix underscore naming for the "object" vehicle?

    The Guise says:

    First, rename the auto-created rule input to align with best practices for naming variables. Click on

    VFM_Vehicle, and rename it to vehicle

    But as the instructions proceeds it turns out that in the instructions example the variabele was not renamed. Because of this I am not sure if the renaming is best practice.

    Kind Regards,

    Erik

  • Hi Erik - the thing about best practices/standards is that you should just have some and then stick to them. So it doesn't really matter. Camel Casing is typically used so that you can more easily read the names of variables, so I use Camel Casing in my CDT variable names EXCEPT where the variable is a Primary Key or a Foreign Key where I use Pascal Casing (again, it's all about how useful it is for humans to read and effectively assimilate the information you want to convey)

  • 0
    Certified Associate Developer
    in reply to Stewart Burchell

    Hi Stewart,

    Thanks for your answer, I know what to do.

    Kind Regards,

    Erik