My Products
Help
omelhus
PARTNER

Fields that are writeable should always be readable

by omelhus

Hey,

 

I have a curious case of a few fields that I'm allowed to write to, but not allowed to read. The fields in questions is fontName and fontStyle on formElement.

 

I really, really, really need to access the value of these fields, so that I can visualize the currently selected font.

 

- Ole

7 REPLIES 7
Accepted solution
Marius Bancila
VISMA

by Marius Bancila

fontName and fontStyle have been made available for formElement and all the other tables (systeminformation, window, workspace, etc.) where a font size column was already available.

query read_forms($cid: Int!)
{
  useCustomer(no :$cid)
  {   
    formElement
    {
      items
      {
        fontSize
        fontName
        fontStyle
        fontStyleFlags
      }
    }
  }
}

mutation write_forms($cid: Int!)
{
  useCustomer(no: $cid)
  {
    formElement_create(values:[{
      fontStyleFlags:[Bold,Italic,Underline,StrikeThrough]
      fontSize : 14,
      fontName : "Consolas"
    }])
    {
      affectedRows
    }
  }
}

This will become available in the next release (tomorrow).

omelhus
PARTNER

by omelhus

Thank you so much! This is now available in the forms editor as well.

omelhus
PARTNER

by omelhus

Hey,

 

I really hope you can have a new look into setting fontName and fontStyle using the API. There is probably an internal processing in vbus that lets you update it, since setting the fields directly through the API is forbidden.

 

This is starting to become an issue, as when we copy a complete print layout we are not able to set the font name, and when the font name isn't set, it seems that it doesn't care about the font size either.

 

Consulants and users are actually editing and working with formulas, and changing fonts and fontsize is really important.

CarlosV
PARTNER

by CarlosV

I hope you get it, it would be great if we could change Fonts, not just size. Since this is very important for most customers, many of them have very customized appearance of forms.

by Marius Bancila

I will bring this to the attention of those who can change it.

omelhus
PARTNER

by omelhus

Thank you!

omelhus
PARTNER

by omelhus

Turns out I'm not able to update the fontName after all - it's just there in the schema taunting me.

 

Please let me read and write fontName and fontStyle.