Skip to main content
Answer

how to add dashes to a text GI?

  • August 14, 2024
  • 3 replies
  • 67 views

Hi everybody.

I’m trying to modify a GI but i cannot get it to work the way i want.

what I want is for this column to be displayed as the "mold" column (with dashes)

 

Best answer by dcomerford

You can use the Concat and Substring to do it by clicking on the pencil on the data field. Example below I am taking 1st 2 characters of InventoryCD and then adding 2 dashes then remainder of the code.

 

3 replies

dcomerford
Captain II
Forum|alt.badge.img+15
  • Captain II
  • Answer
  • August 15, 2024

You can use the Concat and Substring to do it by clicking on the pencil on the data field. Example below I am taking 1st 2 characters of InventoryCD and then adding 2 dashes then remainder of the code.

 


andriitkachenko
Jr Varsity III
Forum|alt.badge.img+6

If I remember correctly, InputMask property of the PXDBStringAttribute not only validates provided values, but also allows you to form how it is shown.

Apart from that - you could create a DAC Extension with a custom field:

        [PXString]
[PXUIField(DisplayName = "Mondrel")]
public virtual string UsrMondrel
{
get
{
return "modified Mondrel value";
}
}
public abstract class usrMondrel : BqlString.Field<usrMondrel> { }

Then use it in your GI.


  • Author
  • Freshman I
  • August 15, 2024

You can use the Concat and Substring to do it by clicking on the pencil on the data field. Example below I am taking 1st 2 characters of InventoryCD and then adding 2 dashes then remainder of the code.

 

Thank you for your help, now the info is displayed as i needed it.