Loading...
 
Features / Usability

Features / Usability


posts: 8633 Israel
Leena wrote:

Hi All,

Sorry if this is not the right place to post this.

I'm using a list execute to set checkbox values from y to n. I am using the attached code but it seems to be doing nothing? However, it returns a success as per the attached.

Do you know what I'm doing wrong?

Thanks


Hello,

It is a bit hard to check your code from a image + there may be so many things going on with other tracker fields. Maybe you just need to add quotes ?

I use a plugin List execute for something very similar, but the other way around. ;-)

Copy to clipboard
{LISTEXECUTE()} {filter field="tracker_id" content="22"} {filter field="tracker_status" content="o OR p"} {filter field="tracker_field_productsboughtEmailSent" content="NOT y"} .../... {step action="tracker_item_modify" field="productsboughtEmailSent" value="y"} {ACTION} {LISTEXECUTE}


Or, may be there is an issue with setting to "n"... 🤷🏻‍♂️
Try on a different page with just one field and one action to check.


posts: 24 Australia

Sorry about not sharing the code, I wasn't aware of the code tags before.

I took your advice and created a new tracker and a new wiki page but had the same result. I also went back to the original and made the same changes but I got the same result :-(

Here is the code:

Copy to clipboard
{LISTEXECUTE()} {filter field="tracker_id" content="14"} {filter type="trackeritem"} {filter field="tracker_field_REG_Alert" content="Yes"} {filter field="tracker_field_REG_FirstEmailReminderSent" content="y" } {filter field="tracker_field_REG_SecondEmailReminderSent" content="y"} {OUTPUT(template="table")} {column label="Contract / Subscription" field="contract_title" mode="raw"} {column label="First Reminder" field="first"} {column label="Final Reminder" field="final"} {OUTPUT} {FORMAT(name="contract_title")}{display name="tracker_field_REG_Company" format="objectlink"}{FORMAT} {FORMAT(name="first")}{display name="tracker_field_REG_FirstEmailReminderSent" default=""}{FORMAT} {FORMAT(name="final")}{display name="tracker_field_REG_SecondEmailReminderSent" default=""}{FORMAT} {ACTION(name="ResetReminders")} {step action="tracker_item_modify" field="REG_FirstEmailReminderSent" value="n"} {step action="tracker_item_modify" field="REG_SecondEmailReminderSent" value="n"} {ACTION} {LISTEXECUTE}


I also tried changing the permissions of the fields but it made no difference..

PS. sorry about the bad spacing. I'm doing this from my phone and can't see the spacing properly...

posts: 8633 Israel
Leena wrote:
Sorry about not sharing the code, I wasn't aware of the code tags before.


Ok I see you added quotes and it didn't help.
I have really a feeling about this "n" value being simply considered as null (just a feeling but your issue rings a bell).

Can you try using a "y" value instead ?

Copy to clipboard
{filter field="tracker_field_REG_FirstEmailReminderSent" content="NOT y" } {filter field="tracker_field_REG_SecondEmailReminderSent" content="NOT y"} {step action="tracker_item_modify" field="REG_FirstEmailReminderSent" value="y"} {step action="tracker_item_modify" field="REG_SecondEmailReminderSent" value="y"}

posts: 24 Australia

Thanks Bernard,

It does update to "y" but the "n" still doesn't work. I tried setting to "y" first and switching immediately to "n" - the "n" doesn't work but the "y" does. I tried the below to no avail:

Copy to clipboard
{step action="tracker_item_modify" field="REG_FirstEmailReminderSent" value="y"} {step action="tracker_item_modify" field="REG_SecondEmailReminderSent" value="y"} {step action="tracker_item_modify" field="REG_FirstEmailReminderSent" value="n"} {step action="tracker_item_modify" field="REG_SecondEmailReminderSent" value="n"}


I also tried this:

Copy to clipboard
{step action="tracker_item_modify" field="REG_FirstEmailReminderSent" value=""} {step action="tracker_item_modify" field="REG_SecondEmailReminderSent" value=""}


And this:

Copy to clipboard
{step action="tracker_item_modify" field="REG_FirstEmailReminderSent" value=off} {step action="tracker_item_modify" field="REG_SecondEmailReminderSent" value=off}


And this:

Copy to clipboard
{step action="tracker_item_modify" field="REG_FirstEmailReminderSent" value="NULL"} {step action="tracker_item_modify" field="REG_SecondEmailReminderSent" value="NULL"}


I tried changing the case to lower-case as well and also added or removed the "". Basically I tried all the combinations I could think of... None of them seem to have any effect?

posts: 8633 Israel
Leena wrote:

Thanks Bernard,

It does update to "y" but the "n" still doesn't work.


Great so that should be good enough, just do the contrary of checking if the value is "n" and if not do the action.

If the field value is not "y", do the action.

I sent you the changes earlier for you filters in your plugin List

Copy to clipboard
{filter field="tracker_field_REG_FirstEmailReminderSent" content="NOT y" } {filter field="tracker_field_REG_SecondEmailReminderSent" content="NOT y"}


That way it will filters the item with those 2 fields not having a "y".
And your action will be to change the field to "y".

posts: 24 Australia
Bernard Sfez / Tiki Specialist wrote:

If the field value is not "y", do the action.
...
That way it will filters the item with those 2 fields not having a "y".
And your action will be to change the field to "y".


Thanks Bernard, that will work. I'll need to think how this will affect some of my other wiki pages with listexecute that send reminder emails out etc.

posts: 126886 United Kingdom
Bernard Sfez / Tiki Specialist wrote:

I kind of agree it should work with "n" value as we, human, intend it.
I think I posted a ticket about this a long time ago.

Definitely sounds like a bug, tested locally here and it doesn't set either "y" or "n".
Here's my simplified test example:

Copy to clipboard
{LISTEXECUTE()} {filter field="tracker_id" content="4"} {filter type="trackeritem"} {filter field="tracker_field_isIt" editable="y" } {OUTPUT(template="table")} {column label="title" field="title"} {column label="is it?" field="tracker_field_isIt"} {OUTPUT} {ACTION(name="Is it = y")} {step action="tracker_item_modify" field="isIt" value="y"} {ACTION} {ACTION(name="Is it = n")} {step action="tracker_item_modify" field="isIt" value="n"} {ACTION} {LISTEXECUTE}


Will see if there's a quick fix...

posts: 126886 United Kingdom

Correction, the above plugin works fine in trunk (and probably in 24.x) - i had a mandatory field required that was preventing it working first time... (could have added ignore_errors="y" i guess rolleyes)

Did you get yours working as you needed? value "y" or "n" works for me here.

posts: 24 Australia
Jonny Bradley wrote:
Correction, the above plugin works fine in trunk (and probably in 24.x)


Ah! I'm on an older version (21.3). I'll get our sysadmin to update this and let you know what happens :-)

posts: 126886 United Kingdom
Leena wrote:
Ah! I'm on an older version (21.3). I'll get our sysadmin to update this and let you know what happens :-)

Hi @lkganguli@gmail.com

It's probably a good idea to upgrade anyway, but this fix should really be in 21.x as well (don't you think @Victor Emanouilov?) so we'll backport it soon, and that should then appear in 21.6 whenever that's released.

Hope you enjoy Tiki24, there are quite a few nice now toys in it compared to 21! mrgreen

posts: 24 Australia
Jonny Bradley wrote:
Hope you enjoy Tiki24, there are quite a few nice now toys in it compared to 21! mrgreen


We just upgraded - it works great! :-D


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting