Multiple conditions via text template & formula in 'WHERE' clause
I have a use case where I am trying to make a flow re-usable to add Opportunity team members. I'm using the lookupFSC component and I have text template with an embedded formula to appropriately filter the users with a custom attribute set on the User record.
The "Where" clause of the FSC works great when it is manually set, but it breaks when I set the WHERE to a text template (so that a formula can dynamically choose the correct custom attribute to be TRUE and also filter on active users). The break on the text template happens even if it is set to a single parameter, I have double checked that it is saving as plain text.
I can see (in the display (form) and display (tt) in the attached screenshots) that the formula is correctly working and that the text template is properly setting.
I'd like to achieve this without any apex required if possible, seems like it should work!
Has anyone successfully been able to execute multiple conditions through a formula/text template in a WHERE clause for this component?
Thanks!
Be careful with Text Templates. By default, when you edit a Text Template, it puts you in Rich Text mode. Be sure to switch to regular text mode and remove any HTML tags that get inserted into the text template.
Yes — I have been sure to check that the text template is saved as plain instead of rich text. Thanks for the reminder, though.
Here are a few more things to try:
- Change TRUE to true
- Put () around each expression
- Assign the Text Template to a Text variable then use the Text variable as your attribute value
On Wed, Jan 29, 2020 at 4:25 PM jegernatt [email protected] wrote:
Yes — I have been sure to check that the text template is saved as plain instead of rich text. Thanks for the reminder, though.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/alexed1/LightningFlowComponents/issues/266?email_source=notifications&email_token=AF4UHX4WVQRF2OMAGQUKPCTRAHX6LA5CNFSM4KNJOZ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKIZRIY#issuecomment-579967139, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4UHXZ7O5BZ2MUNKTX5H4TRAHX6LANCNFSM4KNJOZ4Q .
Have you turned on the debug log to see what is actually being inserted into the APEX class? I would ask mention that formulas and text templates are set before and after the screen, not during. So if you are expecting the value to change based on what is happening on the screen it will not work.
Speaking of text templates @ericrsmith35, @alexed1 Are you aware of the bug that always flips text templates from Plain Text to Rich Text whenever you make changes to it? Flow doesnt seem to remember your previous preference.
Yes, I have been "bit" by that one far to often.
On Wed, Mar 4, 2020 at 9:37 PM adwhite75 [email protected] wrote:
Speaking of text templates @ericrsmith35 https://github.com/ericrsmith35, @alexed1 https://github.com/alexed1 Are you aware of the bug that always flips text templates from Plain Text to Rich Text whenever you make changes to it? Flow doesnt seem to remember your previous preference.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alexed1/LightningFlowComponents/issues/266?email_source=notifications&email_token=AF4UHX2PMNOTDVUUO25DEADRF4F63A5CNFSM4KNJOZ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN3PEUY#issuecomment-594997843, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4UHX7CYIRQUYV6DVMHIXDRF4F63ANCNFSM4KNJOZ4Q .
@jegernatt were you ever able to grab the apex log to see what is getting passed into apex? Did you check out cchrisv's comment?