Lookup Record ,check status
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi ,
lookup Record in flow
When look up record action how to check there is any record satisfies condition. how to check that within the flow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
based on the condition 'status' I check but no fulling the condition.
as per my requirement
review task table I want to check
for the corresponding parent record have any review task in request revision then update that review task state to assigned .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello @armanoj ,
Have you check manually is there related record or not, for given condition . If there is record then in status it will give you success otherwise error .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello @armanoj ,
1) If you are using Look Up Record Action -> You get Record for that condition :
2) If you are using Look Up Records Action ->You get count + respective records as per count :
3) And If the condition not satisfy then you get the error :
If my response helped mark as helpful and accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @armanoj
Refer: https://www.youtube.com/watch?v=U898c4PMsWA&xstg=CAMSBhUD_LL2Hw%3D%3D
https://www.youtube.com/watch?v=hcdeqyaGKbk
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday - last edited yesterday
Hello @armanoj
Seems like your requirement is - "Based on the parent record, I need to find any related Review Task that is currently in Request Revision status. If such a Review Task exists, update its state to Assigned."
var count = 0;
var reviewTask = new GlideRecord('your review task table name'); //update the table name
reviewTask.addQuery('parent', current.parent);
reviewTask.addQuery('state', 'request_revision'); //update the field name
reviewTask.query();
while (reviewTask.next()) {
count++;
reviewTask.setValue('state', 'assigned'); //update the field name
//reviewTask.update();
}
gs.info(count);
If yes, then your flow will be something like:
Validation Results:
before:
after:
Hope that helps!
