Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confiform 'Lookup and Set Value' is not refreshed in table view

Peter Baschan
Contributor
March 25, 2025

Hi,

I have two forms:

- 'ProjectUpdates' to capture project updates with fields: Project (Dropdown), and Update (TextArea)

- 'ProjectList' to show project data with fields: ProjectName (Text), JiraLink (Jira link), and LastUpdate (lookup from 'ProjectUpdates' using sort by 'created' DESC and Limit to 1 result

 

In the TableView for 'ProjectList', when I add a new project, it pulls through the last update from the 'ProjectUpdates' form nicely. However when I add a new entry for the Updates form, the TableView for the ProjectList is not refreshed to bring in the latest update. It only updates, if I go and Edit the ProjectList entry, it brings in the latest update, so without changing anything, I press Save and the table is now showing the correct last update.

A simple page refresh is not enough, I have to physically open the entry for editing, to get the looked up field refreshed.

Is there a way to make the TableView refresh automatically, so the lookup brings in the latest update? 

 

Thanks,

Peter

1 answer

1 accepted

3 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
March 25, 2025

With a "lookup and set value", you copy it from the place where you have looked it up from

(the value represents the copy of the value at this time the lookup has been made)

Alex

Peter Baschan
Contributor
March 25, 2025

Thank you, I understand. Is there any alternative way to achieve the same thing? To show a value from another form based on a set criteria, but the result may be different as time goes on? Kind of like having an 'IFTTT' rule called 'onRefresh'. Thank you.

Peter Baschan
Contributor
March 25, 2025

I managed to find a solution using the OnCreated IFTTT with 'Update ConfiForms Entries by Filter' action. Essentially the ProjectUpdate new entry overwrites the field on the ProjectList form.

Alex Medved _ConfiForms_
Community Champion
March 25, 2025

That could be one solution, another might be to query the field in ProjectUpdate directly using queryAndRender - https://wiki.vertuna.com/spaces/CONFIFORMS/pages/2359385/Virtual+functions

So, you are not copying (therefore no need to look up and set or the field itself), but kind of doing a direct lookup in the view 

Peter Baschan
Contributor
March 26, 2025

I haven't used Virtual functions before. Do you use with Field Definition Rule macro? The below doesn't seem to work (the ProjectName is a dropdown in 'ProjectUpdates' and a standard text on the 'ProjectList'). I am trying to bring back the most recent entry, hence me trying to use 'created DESC LIMIT 1'

p>
<ac:structured-macro ac:macro-id="5c5d8280-e47e-4f83-a51d-73c5257d4b13" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="values">Update=id.queryAndRender(ProjectUpdate:4609294927;ProjectName.Label:[entry.ProjectName] created DESC LIMIT 1;created|Update;card)</ac:parameter>
<ac:parameter ac:name="action">Set value</ac:parameter>
<ac:parameter ac:name="actionFieldName">Update</ac:parameter>
</ac:structured-macro>
Peter Baschan
Contributor
March 27, 2025

Ok, I figured it out, I should just use the simple Field macro. It is now reading the ProjectUpdates. However it brings up all the updates not just the latest one.

 

@Alex Medved _ConfiForms_ is there a way to add this clause to the virtual function filter 'created DESC LIMIT 1'?

I tried SORT BY or ORDER BY, none of them seemed to work

Update.queryAndRender(ProjectUpdate:4609294927;ProjectName.Label:[entry.ProjectName] SORT BY created DESC LIMIT 1;created|Update;card)

Alex Medved _ConfiForms_
Community Champion
March 28, 2025

See queryAndSet function (not queryAndRender)

It offers a way to specify the LIMITs

Like Peter Baschan likes this
Peter Baschan
Contributor
March 28, 2025

Thank you, works perfectly!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events