Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
hermanitor
Contributor III
Contributor III

Issue with Chr and using as

Hi,

I have a dimensions in a table that I am using to send out a message to some email recipients.

So

Data:
Load
'String' as [Dear Colleague(s) & Chr(44)  & Chr(10) Please]

Now whatever I do in the square brackets, it still does not format the as part in the message as I require.
I have tried to do this as a variable and create a long string here and then use the variable in the as instead of creating a long string there.
Either way, neither method appears to be working for me.
I am not going to send the very long string that I am required to build!

Any ideas on how to solve?
Any further questions?

Any assistance appreciated.  (he said banging his head against the wall!)

 

Labels (2)
5 Replies
Chirantha
Support
Support

Please try this (without square brackets) and see if it helps

Data:
Load
'String' & Chr(44)  & Chr(10) & 'Please' as Message;

Aditya_Chitale
Specialist
Specialist

You can directly use  ' , '  instead of chr(44)  &  ' - '  instead of chr (10) in field name as it is going to remain constant.

 

Regards,

Aditya

hermanitor
Contributor III
Contributor III
Author

Hi Chirantha,
The issue is not the creation of the dimension.  This part is fine.  
My issue is with the part of 'as Message'  This is the part that I want to change/maniupulate...

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can do it like this:

Let fname = 'Dear Colleague(s)' & Chr(44)  & Chr(10) & 'Please';
Data:
Load
'String' as [$(fname)]
AutoGenerate 1;

I don't think there is any way to dynamically calculate the fieldname within the Load statement. The fieldname must be a constant. 

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

hermanitor
Contributor III
Contributor III
Author

Hi All.
Thanks for the responses concerning this.
The use case for this was to send an email message, which we are doing via the the SMTP method.
Instead of embedding the information in the message I was trying to add it to the link via an 'as methodology'.
In the end I have just embedded the string in the email body message.
Not what I wanted to do, but it solves the solution...!
However I did have some fun with trying to solve this using a number of results.
Thanks for any support provided here.  Am sure I will have a play with the strings in the future
Steve