Forum Discussion
NickCharalambou
11 months agoQrew Cadet
OK I have updated as follows as I realised the opening string was incorrect and simply blank.
However it still not working.
{# Capture the initial detail value that is passed into the template #}
{% set initial_detail = g.detail %}
{# Initialize a list starting with the initial content of j.detail #}
{% set messages = [initial_detail] %}
{# Check if the requested offer types have changed and append a message if true #}
{% if a.requested_offer_types != a.$prev.requested_offer_types %}
{# Create a message about the change #}
{% set message = "Requested Offer Types changed from '" + a.$prev.requested_offer_types + "' to '" + a.requested_offer_types + "'" %}
{# Append the message to the messages list #}
{% set _ = messages.append(message) %}
{% endif %}
{# Output all accumulated messages, including initial and new ones, separated by new lines #}
{{ messages | join('\n') }}
I think the join is wrong.
- PrashantMaheshw11 months agoQrew Captain
We recently solved something like this when a.$prev didn't work for us. In our case
- Existing field was getting update via incoming webhook
- Step 1 , Receive webhook
- Step 2 , Receive the value of existing value (which is what I am detailing here)
- Step 3 , Join existing value and webhook value
First do a query on
https://api.quickbase.com/v1/records/query
In my scenario it looked like below
{
"from": "{{a.body_params.parentid}}", --> tableid
"select": ["{{a.body_params.fid}}"], --> fid of record you want
"where": "{3.EX.{{a.body_params.recordid}}}" }. --> Query you
This will allow you to 'get' the value of the existing field first.
This was stored inside for me
{b.json.data[0]}
Then another query doing make request and append value. Hope this makes senseAs for your actual join , you can trying using ~ to concat like {{ (a.firstname) ~ ' ' ~ (a.lastname) }}