Jump to content

Base64Decode text and fill


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

Recommended Posts

Hi all

How can I get my calculated Base64Decode container field to display some centralised (vertically and horiztonally) text, and have the entire background a certain colour?

Thanks

Link to comment
Share on other sites

I don't get this. The Base64Decode() function decodes data encoded in Base64. The data can be either text or a file. If it's text, then you can use a Text field (or a calculation field with a Text result) to display it like any other text (including formatting). If it's a file, then you have no control over its content; if it's an image file, you can display it - but you can only display it as it is (although you can control the image size and its alignment within the container).

 

Edited by comment
Link to comment
Share on other sites

Ah I must be a bit confused. Basically I have a photo container field that pertains to each user. If the user doesn't have a photo then the I want their initials displayed instead. I've so far achieved this by creating a calculation field with the following calc:

If ( IsEmpty ( photo ) ;
Left ( Forename ; 1) & Left ( Surname ; 1 )
; photo )

This works great, and I can add colour to the background by specifying it as the fill of field object in the layout. However I end up getting bits of that colour around the outside of the field if it is populated with a photo. Also it would be nice to be able to specify different colours for each user. So I was wondering if I could bring those extra formatting features to the calculation field.

Thanks!

Link to comment
Share on other sites

2 hours ago, sal88 said:

However I end up getting bits of that colour around the outside of the field if it is populated with a photo.

Two possible solutions:

1. Set all padding values to 0 and format the field to reduce/enlarge the image to fit. Of course, this can only work if you also deselect "Maintain original proportions" and make sure all photos have the same width-to-height ratio;

2. Make the field transparent and format it conditionally to have a fill color when IsEmpty ( photo ). This will also allow you to add more conditions - and more colors - so that each group of users can have its own color.

Link to comment
Share on other sites

This topic is 1760 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.