Solved

Quick question about visible expression


Userlevel 3
Badge +1

Hello,

What can I write in the visible expression for this ‘SN’ + [SOShipline.LotSerialNbr] to NOT display if [SOShipline.LotSerialNbr]=NULL. Thanks a lot!

I’ve tried these:

=[SOShipLine.LotSerialNbr]<>Null

IIf( [SOShipLine.LotSerialNbr]=Null, '', [SOShipLine.LotSerialNbr] )

=IIf( [SOShipLine.LotSerialNbr]<>null, [SOShipLine.LotSerialNbr], '' )

 

Edit: This works but not when I need the ‘SN: ‘ before [SOShipLine.LotSerialNbr]

=IIf([SOShipLine.LotSerialNbr]<>null,[SOShipLine.LotSerialNbr],'')

Trying this,

=IIf([SOShipLine.LotSerialNbr]<>null,('SN: ' + [SOShipLine.LotSerialNbr]),'')

Results to this:

Any help please, thank you!

icon

Best answer by aaghaei 20 January 2023, 07:29

View original

13 replies

Userlevel 3
Badge +1

Sorry I mean, I’m putting this in the Value field, not in the visible expression.

Userlevel 3
Badge +1

Oh, or could it be because in this list, I have an item that HAS serial number, which is already true, and so it would give my SN value and disregard the fact the next items are false? Is this correct, anyone? Thanks!

 

Userlevel 7
Badge +8

@paula012 null value comparison requires special syntax. Try 

=IIf(IsNull([SOShipLine.LotSerialNbr], '')<>’’,‘SN: ‘ + [SOShipLine.LotSerialNbr],'')

Userlevel 3
Badge +1

@paula012 null value comparison requires special syntax. Try 

=IIf(IsNull([SOShipLine.LotSerialNbr], '')<>’’,‘SN: ‘ + [SOShipLine.LotSerialNbr],'')

Thank you, but it resulted to error.

 

Userlevel 7
Badge +8

I was typing on iPhone. The issue could be single quotations. Use your laptop keyboard to replace them and should work

Userlevel 3
Badge +1

Thanks again, now it does

But why is the {Br} not working, this is my formula now sir

=IIf(IsNull([SOShipLine.LotSerialNbr], [SOShipLine.TranDesc])<>’’, [SOShipLine.TranDesc] + '{Br}' + 'SN: ' + [SOShipLine.LotSerialNbr], [SOShipLine.TranDesc])

I also tried without closing {Br} with ‘’

Userlevel 3
Badge +1

Oh nevermind, I got it. Thank you so much sir @aaghaei , such a huge help!

Userlevel 7
Badge +8

Please copy your final formula here for people reference in case they come across the same issue. Thanks 

Userlevel 3
Badge +1

Please copy your final formula here for people reference in case they come across the same issue. Thanks 

=IIf(IsNull([SOShipLine.LotSerialNbr], [SOShipLine.TranDesc])<>’’, [SOShipLine.TranDesc] +'{br}'+ 'SN: ' + [SOShipLine.LotSerialNbr], [SOShipLine.TranDesc])

 

Thanks a lot sir!

Userlevel 3
Badge +1

Sir @aaghaei , one more related question please.

So this is now the source of my Serial#s- SOShiplineSplit, they’re listed on Line Details in acumatica, wherein ONE Item has many serial #s. Is it possible for me to display that Item once, then followed with the multiple serial#s? Thank you again!

Userlevel 7
Badge +8

Sorry this is not my area of expertise so I do not want to give you a misleading answer.
 

What I can say if you have an inventory item that serials are the child of it (serials are entered as records on a child table) then you can add a sub-report to your main report that will grow based on the number of serial #s. 
 

If the serials are entered in front of item description (all in one text field and speared with a unique character )  to some degree using mix of InStr and Substring functions you can find the start position of serials and use line break to print them under each other.

 

both of scenarios need a little bit of work to get them work but both are doable.

Userlevel 3
Badge +1

Oh, I know this may be easy to you, but as I’m not yet very understanding of subreports, and even more, of using InStr and SubString, I think I need to comprehend this first and make a follow up question. But I need it fast, perhaps.. can you consider this instead? Is it possible that I can insert a condition that if [SOShipLine.TranDesc] already EXISTS, then that should not display? I got this formula from someone here, do you think I can make use of it somewhere in my existing formula?

IIf(Prev([SOShipLine.TranDesc])=[SOShipLine.TranDesc], '', [],[SOShipLine.TranDesc]

 

Again, thank you so much!

Userlevel 7
Badge +8

It might. Please create a new thread with proper topic and attach your report template that community people can have a look. If you tag me I will try to have look too within my time constraints.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved